how to check if a number is 8 digit python code example Example: how to check if digit in int python s = set(str(4059304593)) print('2' in s)