my = "F34E72H7"
print (my[my.index("E"):my[my.index("H")]) #72
my = "G5293S982J"
start = input('Enter the start: ').upper() # S
end = input('Enter the end: ').upper() # J
try:
result = my[(my.index(start)+1):my.index(end)]
print(result) # 982
except:
print('No matches!')