Finding minimum in the list

I am getting an error if i find minimum of a list at the second time.

list=[1,3,5,1,4]
min=min(list)
list.remove(min)
min=min(list)
print(list)

Traceback (most recent call last):
File “/data/user/0/ru.iiec.py
droid3/files/accomp_files/iiec_run/iiec_run.py”, line 31, in
start(fakepyfile,mainpyfile)
File “/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py”, line 30, in start
exec(open(mainpyfile).read(), main.dict)
File “”, line 4, in
TypeError: ‘int’ object is not callable

[Program finished]

Hello there,

The interpreter is complaining, because you have re-assigned the keyword min to be an integer. So, min == 1, and therefore min([list]) does not make sense.

Hope this helps

So what measures should I take to avoid it

You need to pick a different nave for your variable. Never name a variable the same thing as a function, especially in Python.