Professional Documents
Culture Documents
Py Samples
Py Samples
<var_name> = <value>
For example:
age = 56
name = "Nora"
color = "Blue"
grades = [67, 100, 87, 56]
If the name of a variable has more than one word, then the Style
Guide for Python Code recommends separating words with an
underscore "as necessary to improve readability."
For example:
my_list = [1, 2, 3, 4, 5]
💡 Tip: The Style Guide for Python Code (PEP 8) has great
suggestions that you should follow to write clean Python code.
🔸 Hello, World! Program in Python
Before we start diving into the data types and data structures
that you can use in Python, let's see how you can write your first
Python program.
You just need to call the print() function and write "Hello,
World!" within parentheses:
print("Hello, World!")
You will see this message after running the program:
"Hello, World!"