I am trying to convert a string, such as 'AB0001', to an integer that appears as '001'
I am trying:
x='AB0001'
z=int(x[2:len(x)])
though my output is:
1
I need this to be an integer to be used in:
format_string=r'/home/me/Desktop/File/AB'+r'%05s'+r'.txt' % z
Thank you for your time and please let me know how to acquire the following outcome:
format_string=r'/home/me/Desktop/File/AB0001.txt'