[![Python question](https://i.stack.imgur.com/UR2Vr.jpg)](https://i.stack.imgur.com/UR2Vr.jpg)

This is my current code:

```py
n = int(input())
lst = []
for i in range(0, n):
    lst.append(input())
    if n == 'y':
        break

lst.sort()

print(lst)

k =len(lst)//2

if k==0 :
    print(lst[k+1])

else :
    print(lst[k])

```

this is the output it's giving me:

```
['3', '3', '6', '7']
6

```

and I need the output to be: `[3, 3, 4, 6, 7] 4`