I want to extract next part (from '-') of the file name which is 000.xyz. [file name is Axx-000.xyz]
so my friend showed me this code but I couldn't understand the code fully.
def get_rank(xyz):
pref = xyz.split('-')[1]
pref = pref.replace('.xyz', '')
return pref
I expect the code will show the result as Axx-000.xyz should be 000 or 000.xyz
Many thanks in advance.