[Solved] how to check str int list and tuple? [closed]


This should work-

for word in file:
    if isinstance(word, int):
        ...
    elif isinstance(word, list):
        ...
    elif isinstance(word, tuple):
        ...
    elif isinstance(word, str):
        ...

1

solved how to check str int list and tuple? [closed]