Python #define equivalent

Python #define equivalent

Python 3 has 33 keywords of which only a few are used by beginners:

[False, None, True, and, as, assert, break, class, continue, def, del, elif, else, except, finally, for, from, global, if, import, in, is, lambda, nonlocal, not, or, pass, raise, return, try, while, with, yield]

Given that Python doesnt support renaming keywords its probably easier to teach a few of these keywords along with teaching programming.

How about if you add the #define stuff then run the c preprocessor (but not the compiler) which will give you a python source.

Python #define equivalent

Leave a Reply

Your email address will not be published. Required fields are marked *