In Python, is there a way to make
a, b, c, d, e = 'dog'
so that
a = 'dog'
b = 'dog'
#etc.
or
a, b, c, d, e = list()
so that
type(a through e)
returns
type 'list'
This has already been answered here: Set multiple variables to the same value in Javascript
in python it would be:
a = b = c = d = e = 'dog'
its the same in javascript but with 'var' at the beginning:
var a = b = c = d = e = 'dog'
a = b = c = d = e = 'dog'in all C successors, including C++, Java, C#, PHP and other.