If your inputs are always like this (starting with "(", end with ")"), you can have your own values ββlike:
input_text.strip(" ()").split(",")
>>> "( ABC,2004 )".strip(" ()").split(",")
['ABC', '2004']
This will use any parentheses at the edges inside the outer brackets.
In addition, if commas can be surrounded / removed by spaces, you can:
[item.strip() for item in input_text.strip(" ()").split(",")]
source
share