# Write a Python program to Replace all Characters of a List Except the given character # Python3 code to demonstrate working of# Replace all Characters Except K# Using list comprehension and conditional expressions  # initializing liststest_list = ['G', 'F', 'G', 'I', 'S', 'B', 'E', 'S', 'T']  # printing original listprint("The original list : " + str(test_list))  # initializing repl_chrrepl_chr = '$'  # initializing retain chararterret_chr = 'G'  # list comprehension to remake list after replacementres = [ele if ele == ret_chr else repl_chr for ele in test_list]  # printing resultprint("List after replacement : " + str(res))