test1 = \'name1\' test2 = \'name2\' .. test3 = \'name45\' test4 = \'name1231231\'
Let\'s say I have bunch of strings which start with \'name\' and
If you know that the prefix is name, then you can either remove just that string, or you can skip the first four letters, like so:
name
s = 'name123' print int(s.replace('name','')) s = 'name123' print int(s[4:])