clubs:python_club:python_club_syntax
Home | clubs :: cloud club :: python_club :: 3D-Printing | projects :: Proxmox | Kubernetes | scripting | utilities | games
Table of Contents
Python Club Topics - Syntax
Questions
- What is syntax?
- Why is this important?
Syntax
- Syntax is the rule set for a particular language
- Indentation is VERY important in Python
- Indentation is used to determine when the code is inside a new contruct
- This is easier than using semicoluns ( eg. ; )
Comments
- Comments are available in 2 forms
- Number/Pound/Hash tag ( # ) at the beginning of the comment
- Normally used to create one-line comments or to disable the interpretation of some code
# this is a comment print("Hello world!") # This is another comment # print("blah blah blah")
- Tripple quotes ( ''' or “”“ )
- Normally used to create multi-line comments to explain complex code
""" This is a multi-line comment that explains what come complex code is doing that can't be done in 1 or 2 lines""" print("Hello world!")
Display Messages on the Screen
- print() function
print('Hello world!')
clubs/python_club/python_club_syntax.txt · Last modified: by 127.0.0.1
