You can execute Python code in Windows Command Line or within a Jupyter Notebook cell:
print("Hello, World!")
Hello, World!
Python uses indentation to define blocks of code:
if 5 > 2:
print("Five is greater than two!")
Five is greater than two!
Python comments starts with #
, and Python ignores them:
print("Hakuna Matata!") # This is a comment
A formatted string literal or f-string, is a way to format strings in Python. It allows you to embed expressions, including variables, directly inside a string, making string interpolation simpler and more readable.
name = "Diana Bishop"
print(f"Her name is {name}.")
Use the Search Bar to find content on MarketingMind.
Contact | Privacy Statement | Disclaimer: Opinions and views expressed on www.ashokcharan.com are the author’s personal views, and do not represent the official views of the National University of Singapore (NUS) or the NUS Business School | © Copyright 2013-2025 www.ashokcharan.com. All Rights Reserved.