# Write a Python program to Avoid Last occurrence of delimitter # Python3 code to demonstrate working of# Avoid Last occurrence of delimitter# Using map() + join() + str()  # initializing listtest_list = [4, 7, 8, 3, 2, 1, 9]  # printing original listprint("The original list is : " + str(test_list))  # initializing delimdelim = "$"  # appending delim to join# will leave stray "$" at endres = ''for ele in test_list:    res += str(ele) + "$"  # removing last using slicingres = res[:len(res) - 1]  # printing resultprint("The joined string : " + str(res))