I'd like to accept a user input consisting of several comma-separated integers and put them in a list. The values are separated by commas. Let's say I'm giving 100,97,84
as input, the desired output would be [100, 97, 84]
. I'm trying the following code:
int(input("Please enter the numbers: "))
but it gives me:
ValueError: invalid literal for int() with base 10: '100,97,84'
What should I do?