Вам просто нужна простая сортировка list.sort () ,
Я добавил строку выше с вашим кодом.
me@me:/py$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = int(input("enter"))
enter8
>>> a
8
>>> list = [25,3,14,17,36]
>>> list.append(a)
>>> list
[25, 3, 14, 17, 36, 8]
>>> list.sort()
>>> list
[3, 8, 14, 17, 25, 36]
>>>