0

I am looking to initially set the value of 3 variables to False within a class.

Is there a more pythonic way of doing this than:

a, b, c = False, False, False
Andrej Kesely
  • 168,389
  • 15
  • 48
  • 91
  • Or https://stackoverflow.com/questions/11634190/most-efficient-way-to-assign-a-value-of-zero-to-multiple-variables-at-once – user3483203 Jul 16 '18 at 19:03

1 Answers1

2

Since False is conceptually a immutable singleton you can do

a = b = c = False
nosklo
  • 217,122
  • 57
  • 293
  • 297