AttributeError: 'list' object has no attribute 'lower'. How to fix the code in order to have it convert to upper or lower?
AttributeError: 'list' object has no attribute 'lower'. How to fix the code in order to have it convert to upper or lower? Question: ` 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(‘Initial string: ‘, lines) res = list(map(removeDigits, lines)) print(‘Final string: ‘, res) print(‘Make …