Hi all! I'm working on learning a little Python, but it's syntax is throwing me - I come from more a JS background.
How do I create a variable in Python?
Thanks!
Hi all! I'm working on learning a little Python, but it's syntax is throwing me - I come from more a JS background.
How do I create a variable in Python?
Thanks!
For further actions, you may consider blocking this person and/or reporting abuse
Sumit -
Paras-96 -
Paras-96 -
Sumit -
Top comments (3)
Hello! Wonderful question!
The simple syntax for a variable is:
variable_name = value
EXAMPLES:
name = "Kai"
is_true = True
zero = 0
Hope this helps!
One of the coolest things about python is how simples it's syntax is:
name_of_variable = value
cat = "Jack"
You just use:
variable_name = 'Name', for strings
variable_name = 1, for numbers. Those one don't carry quotes.