variables a, b, c and d all need to be set to 'foo'.
Is there a way to accomplish this in one swooping assignment? Like:
a, b, c, d = 'foo'
Ref this
Best way to do it as follow as you need common value to all your variables
a= b= c = d = 'foo'
for different value you can do
a, b, c, d = 'foo1', 'foo2', 'foo3', 'foo4'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With