Skip to content

Commit c934ba7

Browse files
authored
Merge pull request #3 from pollmix/master
removed extra loop
2 parents f2873f0 + 1d33158 commit c934ba7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

DataTypes/NestedLists.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@
1010

1111
n=int(raw_input())
1212
ar={}
13+
val_ar=[]
1314
for i in range(0,n):
1415
tmp_name=raw_input()
1516
tmp_marks=float(raw_input())
1617
ar[tmp_name]=tmp_marks
17-
18-
val_ar=[]
19-
for i in ar:
20-
tmp_val=ar[i]
21-
val_ar.append(tmp_val)
22-
18+
val_ar.append(tmp_marks)
19+
2320
set_val=set(val_ar)
2421
val_ar=list(set_val)
2522
val_ar.sort()

0 commit comments

Comments
 (0)