Monday, September 24, 2018

Modules

!!!You can use these to add modules in Python!!!
import module_name      
   Example: import math
from module_name import module’s symbol table
    Example: from math  import sqrt
from module_name import *
    Example: form math import
import module’s symbol table as module_name
    Example: import sqrt as math
    Example: from fibo import fib as fibonacci

!!! YOU CAN RESTART INTERPRETER  !!!

 importlib.reload(modulename)

No comments:

Post a Comment