how to assign multiple variables in one line 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: assign multiple variablesin one line
a = 1
b = ('Hello")
a,b = 1,'Hello'
Example 3: how to assign a value to multiple variables in python
r = kindle = H = 24
Example 4: 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'>