I am working on this CodeWars Kata and just to get started I decided to split the given numbers into individual list items to check and see if the amount of digits was 2 or greater but when I run this code block it returns false even though when I print the resultant list out it has more than one item in the list. I believe the function should be returning my print statement of "numbers not asc".
Am I missing something super obvious?
def sel_number(n, d):
#converts digits into individual ints and then converts those into strings and loads into a list
first_num = [int(a) for a in str(n)]
second_num = [int(b) for b in str(d)]
#check if length of list is 2 or more otherwise return false
if len(first_num) or len(second_num) <= 1:
return False
#check if numbers in list are ascending
elif first_num != sorted(first_num) or second_num != sorted(second_num):
print('numbers not asc')
else:
return True
sel_number(21, 21)