Sep-06-2019, 01:58 PM
This is a basic issue that has given me fits and I think Atom has been making it more complicated by wanting to place additional [single] quotation marks when I type one.
I want the output to be:
"<searchfor>" is not in the file.
searchfor is a string entered by the user.
If I do
If I do
then I get "SyntaxError: EOF while scanning triple-quoted string literal"
Also, I think input and print are different with regard to how many arguments they'll take and that makes it more difficult when trying to intersperse variables with boilerplate text.
When should I use regular quotation marks rather than a single (apostrophe) and how do I use them for formatting things like this?
I want the output to be:
"<searchfor>" is not in the file.
searchfor is a string entered by the user.
If I do
print(searchfor,'is not in the file.')then I don't get quotes around searchfor.
If I do
print('''searchfor,'' is in the file.')
then I get "SyntaxError: EOF while scanning triple-quoted string literal"
Also, I think input and print are different with regard to how many arguments they'll take and that makes it more difficult when trying to intersperse variables with boilerplate text.
When should I use regular quotation marks rather than a single (apostrophe) and how do I use them for formatting things like this?