how to import something in python 1

how to import something in python

import 

# alternitvly if you are trying to import something from the same folder as your pyhon file
import .

# if you wanna import something from a certain module
from  import 

Here is what the above code is Doing:
1. import the module named “random”
2. import the function named “randint” from the module named “random”
3. import the function named “choice” from the module named “random”

Similar Posts