Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit f8e9300

Browse files
authored
Update 3_sort.py
1 parent 3fd7f62 commit f8e9300

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

3_sort.py

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
list1=["Ron","Hermione","Harry","Professor","Dobby","List Items 2","The House Elf","Potter","Granger","Lockhart","Weasley"]
2-
list2=["Potter","Fred","Greg","George","Voldemort","Sirius","Dumbledore","Potter","Fred","Greg","George"]
1+
list1=["Ron",
2+
"Hermione",
3+
"Harry",
4+
"Professor",
5+
"Dobby"]
6+
list2=["The House Elf",
7+
"Potter",
8+
"Granger",
9+
"Lockhart",
10+
"Weasley"]
311
list1.sort()
4-
for i in range(0,11):
5-
for j in range(0,11):
6-
str=list1[i]+list2[i]
7-
print str
8-
break
12+
for i in range(0,5):
13+
str=list1[i]+list2[i]
14+
print str

0 commit comments

Comments
 (0)