def compact(word):
holder = []
for i in word:
if i is True:
holder.append(i)
return holder
print(compact([0, 1, 2, 3, False, ""]))
I am a python beginner and this is the code I have written to append the list "holder" with only true values. So the list should contain only 1, 2, 3. However when I run this code the output is only an empty list []. I'm sorry if this is a dumb question but I am trying to understand where I am going wrong.