set list start at 1 python

Solutions on MaxInterview for set list start at 1 python by the best coders in the world

showing results for - "set list start at 1 python"
Vanessa
14 Apr 2018
1A = ['dummy',5,2,6,4,1,3]
2for j in range(2,len(A)):
3    key = A[j]
4    i=j-1
5    while i>0 and A[i]>key:
6        A[i+1] = A[i]
7        i = i-1
8    A[i+1] = key
9A.pop(0)
10print A
11
similar questions
queries leading to this page
set list start at 1 python