Python Runtime parsing of program generated code. | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Python Runtime parsing of program generated code.

Hi Everyone, Perl has the eval function which let's you execute strings that are generated by your code. Does Python have an equivalent feature??? I am not sure where to look in the documentation??

10th Mar 2020, 11:45 PM
Rick Shiffman
Rick Shiffman - avatar
2 Réponses
+ 1
thanks Gordon, that's the information I was looking for. btw the perl function is eval also. not exec, oops my bad.
11th Mar 2020, 2:08 AM
Rick Shiffman
Rick Shiffman - avatar