Jun-20-2017, 11:07 AM
I watched "Python Programming" by Derek Banas on YouTube, he mentions newlines, and I decide to play around with it a little
So I think, "Let's check the doc." Search for \b: no results. Search for \n: no results. Search for line continuation character: no results. Check index: no results. OK, let's try a different version. Change from 3.6 to 2: same thing.
Alright,
SO, does anyone know if I should be able to find this information in the docs? What is a line continuation character? Where should I look to find all the things I can use a backslash for?
print('hello', \n, 'world)being the simplest example. I run the code expecting
Output:hello
world
but instead get a popup:Error:Syntax Error
unexpected character after line continuation character
I figure whatever, not really important, and fiddle around until I get it working the same as the video. But then, I try another neat trick to only check the first letter of a word, which is supposed to be \b
, and I'm not figuring out how to get it to work. No matter where I put it, I get the syntax error.So I think, "Let's check the doc." Search for \b: no results. Search for \n: no results. Search for line continuation character: no results. Check index: no results. OK, let's try a different version. Change from 3.6 to 2: same thing.
Alright,
if first != success try = againSo I spend 20 minutes looking on the forums for anything helpful and,
try = again.
SO, does anyone know if I should be able to find this information in the docs? What is a line continuation character? Where should I look to find all the things I can use a backslash for?