how to use if with isdigit in python code example Example: isdigit python s='12' s.isdigit()#returns True