Please Help!!! How can I put user input into a list : thanks for helping.
I am having trouble with the following code:

digitsList = input("Enter any list of 0 or more digits in the form [digit, digit, ...]:")

if element == int(list[index]):
   index += 1
   return True

else:
   index += 1
   return False

for example the user entered: [1,2,3]

then I get a following error:
ValueError: invalid literal for int() with base 10: '['

I tried everything I can but seems not being able to solve it. 

