Python data type: Strings¶
Explore Python interpreter¶
Start python interpreter
➜ ~ python
Python 3.8.7 (default, Mar 4 2021, 21:47:43)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Show how to exit the python interpreter
* exit()
* Ctrl + D
Mention: * auto-completion with Tab * history with up/down arrows
Show comment:
Starting with strings¶
Create a variable:
Explain that you have to use the same quote types:
Explain that spaces are not important:
>>> hostname='router1'
>>> hostname= 'router1'
>>> hostname = 'router1'
>>> hostname = 'router1'
>>>
Explain type()
Difference between variable and print():