How can i set isdigit() command as a variable?
- by Nick
I'm new to python but I caught on to the basics pretty quick and decided to start trying to make a program while I'm still learning, since I learn best by actually doing things.
So I'm making a program in python that will add polynomials and I need to see if a character from the parser is numeric im using the isdigit() command.
Instead of having to type isdigit() all the time in my code such as n.isdigit(), I want to assign it to a variable t = 'isdigit()' and then type n.t. This doesn't work, so is there an alternative to not typing the whole command?