I have a list containing server names like ['oracle0123','oracle0124','oracle0125']. I want to check how many digits are at the end of the server name, as this varies (as in this case, it is 4). I have a vague idea how this should be done, but my approach didn't work.
v=['oracle0123','oracle0124','oracle0125']
def get_num_position(v):
for i in v:
i=i[::-1]
print('reverse server is-',i)
for j in i:
x=0
if j.isdigit():
x = x+1
print(x)
return x
get_num_position(v)