administrata said:
Is it possible?
I tried...
I = "John"
print \
"""
I used to love pizza"""
Error occurs!!!
But, I don't know how to fix... HELP
thx 4 reading.
Point 0: It helps if you post a copy of what the actual screen display
looked like, instead of just saying "Error occurs!!!".
It helps in that people are more likely to be bothered helping you,
instead of just writing you off as clueless and unclueable -- and as
you have chosen to try Python, you can't be utterly beyond redemption
Point 1: So, which error? Let's guess:
You got something like this:
! print \
! ^
!SyntaxError: invalid token
If so, that is very likely because you had one or more spaces after the
\. Backslash means line-continuation only if it is the LAST character
in the line.
If not, see point 0.
Point 2: so-called multiple quotes: this is nothing to do with your
problem. The different ways of quoting differ only in what characters
like other quotes and newlines can appear inside the quotes.
True
Point 3: To print using what you call variables:
Point 4: How far through the Python tutorial have you progressed?
Point 5: If some bright spark suggests something like the following,
ignore them until you are up to speed on points[:5]:
Fred used to ...
Point 6: If you don't understand the meaning of [:5], refer to point 4.
HTH,
John