Use standard library module

'' ' 
# Standard library: The system comes with the 
format: import module1 [, Module2, module3 ... .modulen] 
import advantages: 
1, no matter how many times the implementation of import in the same file, the system will default to import real time 
2, preventing execution over and over again the same module 

content # using standard library modules: module name function name / variable name 

'' ' 
# a time a module incorporated 
Import Math
 Import Random
 Import Time 

# disposable introducing multiple files 
Import Math , Random, Time 

# using 
Print (Math.PI)
 Print (random.random ()) 
the time.sleep ( 2 )
 Print (1234)

 

Guess you like

Origin www.cnblogs.com/BKY88888888/p/11272021.html
Recommended