Dir() in Python | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Dir() in Python

Can't understand what do dir(). Do u can explain it easily?

18th Jul 2019, 11:12 AM
Deprion
Deprion - avatar
2 Respostas
+ 1
Dir returns list of the attributes and methods of any object (say functions , modules, strings, lists, dictionaries etc.) Try this: import random import math print(dir())
18th Jul 2019, 11:36 AM
Dejan FrancuzšŸ„‡
Dejan FrancuzšŸ„‡ - avatar
0
Thx
18th Jul 2019, 8:02 PM
Deprion
Deprion - avatar