Your code is iterating over the lines of the file, and testing whether the entire line is a digit. You need to remove the digits from each line instead.
Try something like this:
def removeDigits(str):
return str.translate({ord(i): None for i in '0123456789'})
def fileinput():
with open('constant.txt') as f:
lines = f.readlines()
print(lines)
print('Initial string: ', lines)
res = list(map(removeDigits, lines))
print('Final string: ', res)
fileinput()