Like how can I remove the ORs and use another simpler way of doing the same?
list = [1, "loki", 2.4]
y = isinstance(list[0] or [1] or [2] or [3], int)
print(y)
Like how can I remove the ORs and use another simpler way of doing the same?
list = [1, "loki", 2.4]
y = isinstance(list[0] or [1] or [2] or [3], int)
print(y)
hope it helps
list = [1, "loki", 2.4]
for i in list:
y = isinstance(i, int)
print(y)