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