Pythonで外部ライブラリを使っていたり、複雑なクラスを扱っていたりすると、「このオブジェクト、一体どんなメソッドを持っているんだろう?」と疑問に思うことがあります。 ドキュメントを読めば分かりますが、コードを書いているその場でサッと確認 ...
# The dir() function returns a list of valid attributes for the specified object. # When called without arguments, it returns a list of names in the current local scope. # When called with an object ...
# dir() - The dir() function returns a list of all the attributes and methods (including dunder methods) available for an object. # dict - This attribute returns a dictionary representation of an ...