Mega Code Archive

 
Categories / Python Tutorial / Buildin Function
 

Exec executes either a code object or a string representing Python code

exec """ x = 0 print  'x is currently:', x while  x < 5:     x += 1     print 'incrementing x to:', x """