-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractise_question.py
More file actions
55 lines (42 loc) · 1.07 KB
/
practise_question.py
File metadata and controls
55 lines (42 loc) · 1.07 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# f=open('filename')
# print(f.name)
# counter = 1;
# dict2 = {};
# for sLine in f:
# sLine = sLine.split()
# for sWord in sLine:
# dict2[sWord]= dict2.get(sWord, 0) + 1
# print(dict2)
# F1=open('filename.txt', 'r+')
#
# import json
# dict1=json.load(F1)
# print(dict1)
# new_dict = dict.fromkeys(dict1)
# print(new_dict)
#from collections import Counter
#A = Counter(dict2)
#B = Counter(dict1)
#print(A + B)
class employee():
location = "New Delhi"
def __init__(self,salary,name,employeeID):
self.emloyee=[]
self.dict = {}
self.emloyee.append(salary)
self.emloyee.append(name)
self.emloyee.append(employeeID)
#def name(self,name):
# self.emloyee.append(name)
#def employeeID(self,empId):
# self.emloyee.append(empId)
h = employee('100000','Absi','23')
print(h.emloyee)
h = employee('100001','Absihfhffh','24')
print(h.emloyee)
h.dict['salary'] = '10000'
print(h.dict)
# h.name('abhishek')
# print(h.emloyee)
# h.employeeID('64')
#h.addFav_food("Pizza")