0

# How to remove EOFError from python program

nlist =[] n = int(input("Enter How many numbers you enter : ")) for i in range(0,n): elem = int(input()) nlist.append(elem) def bubble_sort(nlist): for passnum in range(len(nlist)-1,0,-1): for j in range(passnum): if nlist[j]>nlist[j+1]: nlist[j], nlist[j+1] = nlist[j+1], nlist[j] bubble_sort(nlist) print(nlist)

1 Answer

+ 3

It's just fine, where you getting error??
Do you know how to give input in solo learn?
Say you need to input 6 elements, your inputs will be like this
6 press enter
1 ""
2 ""
3 ""
4 ""
6 ""
2 now press submit
note: ("") meant 'same for this too'