I tried to use raw_input()
to get a list of numbers, however with the code
numbers = raw_input()
print len(numbers)
the input
In Python 3 :
input_list = [int(x.strip()) for x in input("enter list:").strip()[1:-1].split(",")]
It will ask to "enter list" so just enter list like [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)
>>>