- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompareList.py
More file actions
Latest commit
27 lines (24 loc) · 624 Bytes
/
Copy pathCompareList.py
File metadata and controls
27 lines (24 loc) · 624 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
fromnumpyimportsort
list1= ['Ada', 'Bucky', 'Angelica','Chrissy']
list2= ['Chrissy','Angelica','Bucky','Ada']
match_list= []
foriinrange(0, len(list1)):
pair= []
pair.append(list1[i])
pair.append(list2[i])
match_list.append(pair)
print(match_list)
# compare
total_match= []
foriinrange(0, len(list1)):
partner1= []
print(list1[i])
foriteminmatch_list:
iflist1[i] initem:
partner1.append(item)
print(partner1)
total_match.append(partner1)
print(total_match)
foritemintotal_match:
ifitem[0].sort() ==item[1].sort():
print('True')