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

[ad_1]

This should work-

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

1

[ad_2]

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