External libraries are imported with import [library name]. Alternatively, you can use the from [library name] import [function name] syntax to import a specific function. Here is an example:
import random
randomint = random.randint(1, 101)
>>> print(randomint)
65
from random import randint
randomint = random.randint(1, 102)
>>> print(randomint)
46