Executing Code Inside Strings : Exec : Buildin Function PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Function » Exec »

 

Executing Code Inside Strings


cards = ['A''K''Q''J']
codeStr = "for card in cards: print "Card = " + card"

exec(codeStr)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Function
» Exec