언어/Python
쓰임새를 모르는 Python object 용도 찾기
★ ☆
2021. 1. 1. 21:02
1. type()
2. dir()
3. help()
unknownObj
type(unknownObj)
# SomeType as numpy.ndarray, string, int
print(dir(unknownObj))
# ['T', '__fun__', '__fun2__', ... , 'some']
# Print out all modules or functions of that object
help(unknownObj)
# print out all the information that help can reach on the screen