fork download
  1. class t(str):
  2.  
  3. def __len__(self):
  4. return 0
  5.  
  6.  
  7. t = t('123')
  8. if t:
  9. print('y')
  10. else:
  11. print('n')
  12.  
  13. print(t)
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
n
123