Bummer! You must be logged in to access this page.

Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Erasing my code

In the workspaces sometimes when I start writing code in front of a code it would start to erase my code. Let me show you:

---> print("Today is " + day + " and it is about " + degrees) --> So if I when I go to change the word day with something like year it would look something like this. ---> print("Today is " + year and it is about " + degrees) it removed the + ". So now if I were to put + " back my code would look like this: ---> print("Today is " + year + " it is about " + degrees), so everytime when I add something like a number or a letter or a symbol it erases stuff that is in front and I have to end up writing the whole line because of that. Is there a way to prevent this from happening?

end = True if end == True print("Thanks!")

1 Answer

Could it simply be that you have your keyboard set to "insert"?

Insert is a button on your keyboard. If you press it, it will cause your keystrokes to not merely add new characters but rather to delete the next character then add the new one you pressed.

Example:

Hello

Cursor is located between e and l

He|llo

With Insert on, I type ck and will get

Hecko.

WIthout the insert on, I type the same and get

Heckllo.

Is this perhaps the issue you are running into?

I just tested it out and I found out that is the reason why it's doing that. Thank you so much !! :)