공부
[Python] if isinstance(object, [list, dict])
승가비
2022. 1. 10. 20:55
728x90
https://stackoverflow.com/questions/26544091/checking-if-type-list-in-python
Checking if type == list in python
I may be having a brain fart here, but I really can't figure out what's wrong with my code: for key in tmpDict: print type(tmpDict[key]) time.sleep(1) if(type(tmpDict[key])==list): ...
stackoverflow.com
https://stackoverflow.com/questions/25231989/how-to-check-if-a-variable-is-a-dictionary-in-python
How to check if a variable is a dictionary in Python?
How would you check if a variable is a dictionary in Python? For example, I'd like it to loop through the values in the dictionary until it finds a dictionary. Then, loop through the one it finds: ...
stackoverflow.com
728x90