python modules list code example
Example 1: modules in python
import random
r = random.randint(1,10)
from random import randint
r = randint(1,10)
from random import *
r = randint(1,10)
Example 2: modules in python
import numpy as np:
Example 3: modules in python
import pandas as pd:
Example 4: cool python imports
import this
Example 5: modules in python
import pyttsx3
Example 6: python standard library
>>> from datetime import timedelta
>>> delta = timedelta(
... days=50,
... seconds=27,
... microseconds=10,
... milliseconds=29000,
... minutes=5,
... hours=8,
... weeks=2
... )
>>>
>>> delta
datetime.timedelta(days=64, seconds=29156, microseconds=10)