В Python 3:
input_list = [int(x.strip()) for x in input("enter list:").strip()[1:-1].split(",")]
Он попросит «войти в список», поэтому просто введите список, как [2,4,5]
(common_py3) PS E:\virtual_env_all\common_py3\Scripts> python
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> input_list = [int(x.strip()) for x in input("enter list:").strip()[1:-1].split(",")]
enter list:[2,4,5]
>>> input_list
[2, 4, 5]
>>> type(input_list)
<class 'list'>
>>>