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
  • 118,151
  • 13
  • 38
  • 75
  • 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
  • 205,639
  • 55
  • 286
  • 290