An empty string is a string value containing no characters. Write it as '' and use it as a starting value when building text incrementally. section 4.4.3 section 2.1.11
Build transformed text
Start with new_text = ''. For each character, append either its mapped replacement or the original character with +=. Printing the completed value produces ABC987. section 4.4.3
def main():
args = get_args()
jumper = {'1': '9', '2': '8', '3': '7', '4': '6', '5': '0',
'6': '4', '7': '3', '8': '2', '9': '1', '0': '5'}
new_text = '' #1
for char in args.text: #2
new_text += jumper.get(char, char) #3
print(new_text) #4
A complete function shows the empty string as an accumulator before a loop transforms each input character. section 4.4.3


