is digit in python code example
Example 1: isdigit python
s='12'
s.isdigit()#returns True
Example 2: python isdigit
my_char.isdigit()
Example 3: python sort isdigit
>>> my_list= ['image101.jpg', 'image2.jpg', 'image1.jpg']
>>> my_list.sort(key=lambda x: int(''.join(filter(str.isdigit, x))))
>>> my_list
['image1.jpg', 'image2.jpg', 'image101.jpg']
Example 4: how to check if digit in int python
s = set(str(4059304593))
print('2' in s)