fork download
  1. x = 1
  2.  
  3. class Foo:
  4. x = 2
  5. a = x
  6. b = [x]
  7. c = [x for _ in range(1)]
  8.  
  9. print(f'x = {x}')
  10. print(f'Foo.a = {Foo.a}')
  11. print(f'Foo.b = {Foo.b}')
  12. print(f'Foo.c = {Foo.c}')
  13.  
Success #stdin #stdout 0.02s 9052KB
stdin
Standard input is empty
stdout
x = 1
Foo.a = 2
Foo.b = [2]
Foo.c = [1]