Basic Syntax
"Hello, World!" Program
# hello.py
# This is a single line comment
'''
This is a block comment to show
comments across multiple lines.
'''
print("Hello, World!")Hello, World!# hello2.py
greeting = "Hello, World!"
print(greeting) # print greeting
print(f"Greeting 1: {greeting}") # print greeting as part of a string phrase
print(f"Greeting 2: {greeting}\n") # print with newline (\n) characterVariable Assignment
Comments
Print Statements
Indentation
Exercises
Resources
Last updated
