reverse list example/homework
This commit is contained in:
parent
9c1f18e2b7
commit
b25e03adfd
1 changed files with 7 additions and 0 deletions
7
python/reverse_list.py
Normal file
7
python/reverse_list.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
i = len(a) - 1
|
||||
|
||||
while i >= 0:
|
||||
print(a[i], end=' ')
|
||||
i -= 1
|
Loading…
Add table
Reference in a new issue