I was trying to split this string in two numbers using multiple delimeters and re library in python
Input: "['2 5']"
Output [2,5]
Code:
data = re.split(r"'[ ]'",str(sys.stdin.readlines()))
print data
integers = map(int,data)
print integers
I don't understand why this code doesn't work, can you help me, please?