""" problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

""" problem

Need help! When I'm trying to use """ to avoid \n, """hello (Press enter) It shows SyntaxError: EOF while scanning triple-quoted string literal What's wrong? What should I do?? Thxxxx!!

3rd May 2017, 11:28 AM
Acacia Le
Acacia Le - avatar
10 Answers
+ 19
Can you please provide the code you wrote!
3rd May 2017, 11:37 AM
Dev
Dev - avatar
+ 4
Oh, you were using the console? If you are using IDLE, you can open a new file, write your whole code there and run it all at once. I recommend to make that your primary mode of working with python until you choose to use a different IDE.
3rd May 2017, 1:36 PM
Tob
Tob - avatar
+ 4
Even three or four lines count as a whole code. The interactive mode is great for playing around and trying stuff, but once you write down expressions spanning several lines, the other one has its advantages. Just keep at it, messing up is learning, learning is messing up.
3rd May 2017, 1:44 PM
Tob
Tob - avatar
+ 3
you can use print("SomeText", end = ' ' ) to avoid \n
3rd May 2017, 11:42 AM
Dinmukhamed Mailibay
Dinmukhamed Mailibay - avatar
+ 3
My guess would be, that you did not close the triple quotes. If it's not that, you should provide a code where the error occurs.
3rd May 2017, 11:59 AM
Tob
Tob - avatar
+ 1
"""Hello
3rd May 2017, 12:32 PM
Acacia Le
Acacia Le - avatar
+ 1
Then I press enter, it shows File "", line 1 """Hello ^ SyntaxError
3rd May 2017, 12:34 PM
Acacia Le
Acacia Le - avatar
+ 1
Hey guys! I figured it out! I need to press shift & enter at the same time! Thank you all !
3rd May 2017, 12:38 PM
Acacia Le
Acacia Le - avatar
+ 1
I don't have some whole code... I've just started learning programming with Python. I keep messing up 😂
3rd May 2017, 1:39 PM
Acacia Le
Acacia Le - avatar
+ 1
I will, thx!
3rd May 2017, 2:09 PM
Acacia Le
Acacia Le - avatar