Consider like I have a string :
stringA = "values-are-10,20,30,40,50"
stringB = "values-are-10"
I need to get only the strings : desired output :
for stringA: 10,20,30,40,50
for stringB: 10
I tried using this - int(''.join(filter(str.isdigit, stringA)))
But it removed all the commas, please let me know how to get the output in that format.