Computer Science, asked by XxYatashixX, 2 months ago

OUTPUT Of Following Python C.ODE

alist=[15,6,13,22,3,52,2]
print ("orginal list is :",alist)
for i in range(1,len(alist)):
key=alist[i]
j=i-1
while j>=0 and key<alist[j]:
alist[j+1]=alist[j]
j=j-1
else:
alist[j+1]=key
print("list after sorting:",alist)

SPAM WILL BE REPORTED​

Answers

Answered by Anonymous
20

Answer:

After Running Following Python C.ode Output is Given In the Above Attachment

Attachments:
Answered by Anonymous
0

Answer:

alist=[15,6,13,22,3,52,2]

print ("orginal list is :",alist)

for i in range(1,len(alist)):

key=alist[i]

j=i-1

while j>=0 and key<alist[j]:

alist[j+1]=alist[j]

j=j-1

else:

alist[j+1]=key

print("list after sorting:",alist)

Similar questions