Package folder structure:
test1 in package:
num = 10
def add(a,b):
c = a + b
return c
test2 in package:
'''import test1 as t
print(t.num)
c = t.add(2,3)
print(c)'''
from test1 import *
print(num)
c = add(2,3)
print(c)
test4 in package:
import time
start = time.time()
for i in range(10000):
for j in range(10000):
pass
end = time.time()
print(end - start)
test5 in package:
from time import sleep
print("how")
sleep(1)
print("are")
sleep(1)
print("you")
test3:
'''import package.test1 as t
print(t.num)'''
from package.test1 import num,add
print(num)
c = add(3,5)
print(c)
[…] 1)| |____Unit 53 Library Management System (Part 2)| |____Unit 54 Object Oriented Advanced| |____Unit 55 Modules|____Python Level 6| |____Unit 56 Windows and Basic Graphics| |____Unit 57 Graphics and Basic […]