-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
32 lines (24 loc) · 922 Bytes
/
test.py
File metadata and controls
32 lines (24 loc) · 922 Bytes
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
employee_number_list =[1,2,3,4,5,6,7]
employee_list = ["archis", "abha","devang","harsh","yash","archis","devang"]
for employee_num,employee in zip(employee_number_list,employee_list):
print(f"{employee_num}: {employee}")
employees_with_same_first_letter = []
first_letter_ascii = 97
while first_letter_ascii <= 122:
for employee in employee_list:
if ord(employee[0]) == first_letter_ascii:
# search how many employees have same first letter
employees_with_same_first_letter.append(employee)
print(f"{employee}")
if len(employees_with_same_first_letter) > 1:
# what should happen next?
first_letter_ascii += 1
'''
employee_dict = {1: "archis",
2: "abha",
3: "devang",
4: "harsh",
5: "yash",
6: "archis",
7: "devang"}
'''