Python Searching and Sorting|Selection sort

Program:1
using temp variable

A = [23,4,56,78,5,8,14,2,8]
for i in range(len(A)):
    min_= i
    for j in range(i+1, len(A)):
        if A[min_] > A[j]:
            min_ = j
    #swap
    temp = A[i]
    A[i] = A[min_]
    A[min_] = temp
# main
for i in range(len(A)):
    print(A[i])
#Output:
2
4
5
8
8
14
23
56
78

Program:2
Without using temp variable

A = [23,4,56,78,5,8,14,2,8]
for i in range(len(A)):
    min_= i
    for j in range(i+1, len(A)):
        if A[min_] > A[j]:
            min_ = j
    #swap
    A[i], A[min_] = A[min_], A[i]
# main
for i in range(len(A)):
    print(A[i])

Program:3
Without using temp variable (characters)

A = ['c','a','t','a','l','y','s','t']
for i in range(len(A)):
    min_= i
    for j in range(i+1, len(A)):
        if A[min_] > A[j]:
            min_ = j
    #swap
    A[i], A[min_] = A[min_], A[i]
# main
for i in range(len(A)):
    print(A[i])

Visitor Counter

0051045