def checkleap(year):
return year% 4 == 0 and not year % 100 == 0 or year % 400 == 0
print(checkleap(2100))
# short circut
x = 0 or None or 1 or false
print (x)
y = 1 and True and False
print (y)
# try and except
try:
x='1'
y = 0
x/y
except ZeroDivisionError:
print ("data error")
y = 1
except TypeError:
try:
print ("data type error")
print(int(x)/y)
except ZeroDivisionError:
print
def a():
print ("function a from main.py")
from dio import a as aa
#()
aa()
#import tria
from tessera import * # import everything from module
print (c)
a()
#set
s = {1,2,3,'a',1,2,'b',3,4,'b',5,6,7}
print(list(s))
print (s)
x = [1,2,3,'a',1,2,'b',3,4,'b',5,6,7]
print (list(set(x)))
print (x)
def a():
print ("I am from dio function a")
def b():
print ("I am from dio function b")
def a():
print ("I am from tessera function a")
def b():
print ("I am from tessera function b")
c = "constant"