-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext3.py
More file actions
21 lines (21 loc) · 713 Bytes
/
Copy pathtext3.py
File metadata and controls
21 lines (21 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
list=[6,5,3,1,8,7,2,4]
count=len(list)
for n in range(0,len(list),2):
if list[n]>list[n+1]:
list[n],list[n+1]=list[n+1],list[n]
else:
list[n], list[n + 1] = list[n], list[n+1]
for z in range(0,len(list),4):
if list[n]>list[n+2]:
list[n], list[n + 2] = list[n + 2], list[n]
if list[n+2]>list[n+3]:
list[n+3],list[n+1]=list[n+1],list[n+3]
else:
list[n+2],list[n+1]=list[n+1],list[n+2]
else:
list[n], list[n + 2] = list[n], list[n+2]
if list[n + 2] > list[n + 3]:
list[n + 3], list[n + 1] = list[n + 1], list[n + 3]
else:
list[n + 2], list[n + 1] = list[n + 1], list[n + 2]
list=list[0:y]