how to check for a number in range and even in python code example
Example 1: python check if number is in range
if 10000 <= number <= 30000:
pass
Example 2: python 3 numbers of a range is even
def check(element):
return all(ord(i)%2 == 0 for i in element) # all returns True if all digits i is even in element
lst = [str(i) for i in range(1000,3001)] # creates list of all given numbers with string data type
lst = list(filter(check,lst)) # filter removes element from list if check condition fails
print(",".join(lst))