I have a list that looks like this:
mylist = ['1,2,3']
It is a list of one string. I want to convert this to a list of integers like:
mylist = [1,2,3]
I tried [int(x) for x in mylist.split(',')]
but it doesn't work.
Can someone please help? Thanks in advance.