String Part 1 in Python3

Strings are enclosed with either double or single quotes. You can use any of the quotes. But if you use single quote on the middle then you have to use double quotes to enclose it and if you want double quote. If you start a string with one type of quote then you have to end it with that type of quote.
The other thing you can also do is you can concatenate strings, you can make a string longer by actually putting two string together.



Here are two different independent strings and the plus actually adds then both together to form a master string.
Now, we will store the strings in variables.



Now, we put some space.




Now, come to the comment, comment is where you've want something to add to remind yourself or give you some information about a particular bit of code. You just have to put hash and type something just like.



And anything after the hash, that entire line is ignored but the computer.
Let's now use another function, we will create a way to actually show a name that's entered from the keyboard on the screen.



So, essentially as you saw, the input function displays the text that's been provided to it then waits for text to be entered into the keyboard.

Comments

Popular posts from this blog

String Slicing and Picking sub-string in Python3

Integers and Float in Python3

Variable in Python3