list1 = [4,9,6,2,7]
n = len(list1)
for i in range(n):
for j in range(i+1,n):
if list1[i]> list1[j]:
list1[i],list1[j] = list1[j] ,list1[i]
print(list1)
bGlzdDEgPSBbNCw5LDYsMiw3XQpuID0gbGVuKGxpc3QxKQpmb3IgaSBpbiByYW5nZShuKToKCWZvciBqIGluIHJhbmdlKGkrMSxuKToKCQlpZiBsaXN0MVtpXT4gbGlzdDFbal06CgkJCWxpc3QxW2ldLGxpc3QxW2pdID0gbGlzdDFbal0gLGxpc3QxW2ldCnByaW50KGxpc3QxKQ==