return output
//----- take list from user-----------
li_st = [int(x) for x in input().split()]
print("Unsorted List")
print(li_st)
////------working on our algo-----------
print("\nSorted list using basic counting sort")
output = counting_sort(li_st, max(li_st) +1, get_sortkey)
print(output)
After Change
//python program for counting sort (updated)
n=int(input("please give the number of elements\n"))
tlist = list()
print("okey now plase give the elemets")
for i in range(n):
tlist.append(int(input("\n")))
k = max(tlist)
n = len(tlist)