-3

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)
LyZeN77
  • 9
  • 4

1 Answers1

0

hope it helps

list = [1, "loki", 2.4]
for i in list:
    y = isinstance(i, int)
print(y)