I am struggling to write a program that will determine if there are only numbers in a list, so floats or integers. Nothing special like "True" is 1 or the ASCII code of "A" or anything like that. I want to check the list to make sure it only has floats or integers. This is my code so far but it doesn't work for all cases.
list1 = [-51,True]
for i in list1:
if (isinstance(i,int))==False and (isinstance(i,float)==False):
print("None")
In this case it doesn't print "None". When it should for "True". Any ideas?