I started learning python. I am wondering how to split a list that has two delimiters.
INPUT
1,2,3,4,5;2
My code:
with open(path, 'r') as f:
for fs in f:
ip= fs.rstrip('\n').split(',')
print (ip)
My output:
['1', '2', '3', '4', '5;2']
Desired output
['1', '2', '3', '4', '5', '2']
Can i please now how to remove the semicolon in the list.
Thanks