basic class and object
def function define
def add (x,y) is an example of adding numbers
def add(x,y):
c = x+y
print(c)
add(45,85)
def person(name,age):
print(name,age)
person(age=85,name='pythonistas')
def person(name,age=18):
print(name,age)
person(name='pythonistas')
def sum(a, *b):
for i in b:
a = a + i
print(a)
sum(4,5,6)
def sum(*b):
a = 0
for i in b:
a = a + i
print(a)
sum(4,5,6)
def person(name, **data):
print(name)
for i,j in data.items():
print(i,j)
person('pythonistas',age=20,city='La',mob=999999999)