Python Syntax

You can execute Python code in Windows Command Line or within a Jupyter Notebook cell:

print("Hello, World!")
Hello, World!
Python Indentation

Python uses indentation to define blocks of code:

if 5 > 2:
    print("Five is greater than two!")
Five is greater than two!
Comments in Python

Python comments starts with #, and Python ignores them:

print("Hakuna Matata!") # This is a comment
Hakuna Matata!

Previous     Next

Use the Search Bar to find content on MarketingMind.