Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

declare multiple variables at once python

a = b = c = "Hello, World"
print(a)
print(b)
print(c)
# OUTPUT:
# Hello, World
# Hello, World
# Hello, World

b = "foo"
c = "bar"
print(a)
print(b)
print(c)
# OUTPUT:
# Hello, World
# foo
# bar
 
PREVIOUS NEXT
Tagged: #declare #multiple #variables #python
ADD COMMENT
Topic
Name
3+2 =