fork download
  1. def f():
  2. for i in xrange(20):
  3. locals()['variable_%s' %i] = 'test'
  4.  
  5. try:
  6. print variable_1
  7. except NameError:
  8. print 'Not defined'
  9.  
  10. f()
  11.  
Success #stdin #stdout 0.01s 6356KB
stdin
Standard input is empty
stdout
Not defined