+ 1
String and numbers
Will python only treat text between quotation marks as strings? In order for Python to output text as it's written in the code, does the text have to be inside quotation marks? Will text only inside quotation marks be called string?
4 Respostas
+ 7
Yes, only the text between quotation marks is treated as a string.
No, strings are not the only type that can be used for outputing, you can also do like print(1+1) or print(myfunc()). Basically anything can be used when outputing stuff.
+ 3
Thank you for your answers.
+ 1
You should be fine
0
Basically yes. See also:
https://en.m.wikibooks.org/wiki/Python_Programming/Variables_and_Strings