How to Create Variables in Python


In this example, we will learn how to create variables in Python.

Source Code

var1 = 20
var2 = 'python'
var3 = ['a', 'b', 'c']
var4 = (1, 2, 3)

print(var1)
print(var2)
print(var3)
print(var4)

Output:

20
python
['a', 'b', 'c']
(1, 2, 3)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments