+ 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?

21st Feb 2018, 10:19 PM
arbaaz
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.
21st Feb 2018, 10:29 PM
Tim Thuma
Tim Thuma - avatar
+ 3
Thank you for your answers.
24th Feb 2018, 11:05 PM
arbaaz
+ 1
You should be fine
21st Feb 2018, 11:44 PM
Chocolate__
Chocolate__ - avatar
21st Feb 2018, 10:29 PM
Sergiu Panaite
Sergiu Panaite - avatar