declaring multiple variables in python code example
Example 1: declare multiple variables at once python
a = b = c = "Hello, World"
print(a)
print(b)
print(c)
b = "foo"
c = "bar"
print(a)
print(b)
print(c)
Example 2: how to assign a value to multiple variables in python
r = kindle = H = 24
Example 3: python set several variables to none
>>> a=1
>>> a
1
>>> a, b, c, d, e, f, g, h, i, j = (None,)*9
>>> type(a)
<class 'NoneType'>
Example 4: multiple variable declaration in python
a = b = 100
print(a)
print(b)
Example 5: multiple variable declaration in python
a, b, c = 0.1, 100, 'string'
print(a)
print(b)
print(c)