![]() Now you might be wondering why should we even use it when we can just write it in one line. You can also put your statement under brackets for some data types and you won’t need to use backslash but it is not true for strings. To extend the statement to multiple lines, all you have to do is put a backslash ( \ ) at the end of the statement. Synta圎rror: EOL while scanning string literal Try making a multi-line statement like this one. You can extend a single statement to multiple lines. Till now, you may have only used single line statements like print(“Hello World”) but there are multi-line statements as well. ![]() Now statements can be of single-line or multi-line. Now some of you might have heard about if, else, for, while, etc… These all are statements. You assign a value to a variable, that’s a declaration/assignment statement. ![]() This is a print statement because you are printing some data, which in this case is a string.Īnything you write is a statement. StatementsĪny instruction that you give to python to execute is a statement. So, without further ado, let’s start now. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |