meds = ['tuberculin Cap(s)', 'tylenol Cap(s)', 'tramadol 2 Cap(s)']
for i in meds:
    if any(char.isdigit() for char in i):
        print(i)
else:
    i = i.replace(' Cap(s)', ' 1 Cap(s)')
print(i)
Replacing letters in Python given a specific condition