-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExplanation
34 lines (29 loc) · 816 Bytes
/
Explanation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// this is how function is define in python
def addition(first , second):
temp=first+second;
print(temp);
return temp;
// to call the function do as usual.
sol = addition(10,15)
// List
list_name=['First Name','LAst Name',12]
empty_list=[]
// Dictionary
student={
'python': "A",
'C': "B",
'Java': "A"
}
//Database in Python
//Colours in Python
//Class in Python
//Constructor in python
x=ClassName(a, b, c);
self keyword is like this keyword. we need not pass any parameter for this
class ClassName:
def __init__(self, val1, val2, val3):
self.var1=val1
self.var2=val2
self.var3=val3
//Inheritance in Python
class SubClassName (ParentClassName):