Variables are created when you assign them a value:
x = 4 # x is of type int
x = "John Doe" # x is now of type str
Adjacent string literals are concatenated:
SUSS1 = "Singapore University " "of " "Social Sciences"
SUSS2 = "Singapore University of Social Sciences"
# SUSS1 is equivalent to SUSS2
You can assign multiple variables in a single line:
x, y, z = "Orange", "Banana", "Cherry"
x = y = z = "Orange"
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-2024 www.ashokcharan.com. All Rights Reserved.