# Write a Python program to Replace Different characters in String at Once # Python3 code to demonstrate working of# Replace Different characters in String at Once# using join() + generator expression# initializing stringtest_str = 'geeksforgeeks is best'# printing original Stringprint("The original string is : " + str(test_str))# initializing mapping dictionarymap_dict = {'e':'1', 'b':'6', 'i':'4'}# generator expression to construct vals# join to get stringres = ''.join(idx if idx not in map_dict else map_dict[idx] for idx in test_str)# printing resultprint("The converted string : " + str(res))