+ 4
Import module
How to get a description of functions from an imported module? For example, to work with a hash, you specified "import hashlib" for me, but how do I know what functions this module contains and what they return ?
10 Respostas
+ 4
Try
import <module_name>
print(dir(<module_name>))
+ 3
run:
help("<module name>.<function name>")
+ 3
So help("hashlib.sha1")is good result . Seb TheS was right, but i didn,t know any function and i got misstake. Russ gave me the way for it. Thank you Seb TheS and Russ:))
+ 3
You can use the original python docs: (including samples)
https://docs.python.org/3.7/library/hashlib.html
+ 1
Seb TheS, But how to get a complete list of module functions?
+ 1
Russ, great:))
+ 1
Ivan Ivanov It should not give errors unless if you typed it with < and > s.
+ 1
Seb TheS,
1.import hashlib
print(dir(hashlib))
Result the best
2. help("hashlib")
Result errors .many many errors
+ 1
Try leaving out the "s
help(hashlib)
- 1
How i can improve in coding? Like pyhton
Now i am student in university and i start Computer science field in August 2019