0

Python code errors line

For example this is my code 1 for i in a: 2something 3 blabalba 4gggha Ok..lets say that i want my code like this 1 for i in a 2somethinf 3i just write it 4 blabalba 5ggha.....the point is that i want to create space so i can write something else... I press enter. I press tab but doesnt create space to write something new

4th May 2020, 8:19 PM
Jason Papastavrou
Jason Papastavrou - avatar
13 Respuestas
+ 1
What exactly is your problem sir?
4th May 2020, 8:21 PM
Slick
Slick - avatar
+ 1
Ooo no you didnt imagine you are writting now a code, until now you have written 40 lines of code and you finish your project. But now you see that you shoud write 2 more lines of code but not in the last part but somewhere in the middle. What do you press from your keyboard to create space so you can write these 2 more lines
4th May 2020, 8:41 PM
Jason Papastavrou
Jason Papastavrou - avatar
+ 1
I go the next line but it has been written, i want a clean line
4th May 2020, 8:56 PM
Jason Papastavrou
Jason Papastavrou - avatar
0
Imagine i have written 40 lines of code... And i figure out that in the middle of my code there is a mistake, 1 line isnt enough i need to write another 2
4th May 2020, 8:23 PM
Jason Papastavrou
Jason Papastavrou - avatar
0
Alright, you may need to. The problem?
4th May 2020, 8:25 PM
Slick
Slick - avatar
0
I want the line 8 to become line 10
4th May 2020, 8:27 PM
Jason Papastavrou
Jason Papastavrou - avatar
0
The reasoning behind it makes no sense to me. Do you have any code you can show where the problem occurs?
4th May 2020, 8:28 PM
Slick
Slick - avatar
0
Take a random code,and try to write 3 line more in the middle of it without removing any line
4th May 2020, 8:29 PM
Jason Papastavrou
Jason Papastavrou - avatar
0
Just did it and it works. for i in range(10): print(i) Its all about indentation. But there should be no reason to be skipping more than one line
4th May 2020, 8:31 PM
Slick
Slick - avatar
0
The question is what should i press from. My keyboard to create a empty line in the middle of. My code
4th May 2020, 8:33 PM
Jason Papastavrou
Jason Papastavrou - avatar
0
Ooooh now i understand. print('\n\n') That'll give you some breathing room for your output. Add the newline character in regular print statments to seperate that infos output on the screen
4th May 2020, 8:35 PM
Slick
Slick - avatar
0
Go to the start of the line and hit the enter key.
4th May 2020, 8:43 PM
Slick
Slick - avatar
0
Right, if you go in the middle of your code, in the example, around line 20. Put the cursor at the start of this line, then hit enter. The text will drop one line while leaving the above text in place. Giving you your line
4th May 2020, 9:04 PM
Slick
Slick - avatar