How Import Works In Python?

# import flask as fl
# print(fl.__version__)

import sys
print(sys.path)



Code file1 as described in the video

from sklearn.ensemble import RandomForestClassifier

print(RandomForestClassifier())

import file2

print(file2.a)


file2.printjoke("This is me")

 

Code file2 as described in the video

 

a =7

def printjoke(str):

    print(f"this function is a joke {str}")

  

 

Comments

Popular posts from this blog

Practice Execise 3

Pickle Module