Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 9 Online
OpenStudy (anonymous):

why every time i copy and paste code in python, it break down? thanks

OpenStudy (anonymous):

Could you be a little more specific about what program you're editing code in, or if you're talking about the interpreter? If you're using IDLE, both the interpreter and the code editor are capable of the standard cut copy paste keyboard shortcuts (CTRL X, C, V).

OpenStudy (anonymous):

It might be an indentation issue. Python relies on indentation to group blocks of code together. So if you copy code from one indentation level and paste it somewhere you need at a different level, you have to adjust the indentation appropriately. Also, as far as I know you can't mix tabs and spaces for indentation, so if you're copying from type and pasting to the other, you'll have troubles. But this is just a guess at what you mean by "break down."

OpenStudy (anonymous):

try commenting out your old code before copying and pasting. then paste into new doc. my mac idle program crashed when copying code from one lecture to another. this fixed my particular issue.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!