Write a Python Program to Replace all Occurrences of ‘a’ with $ in a String
Topic: Write a Python Program to Replace all Occurrences of ‘a’ with $ in a String
Solution
def replacestring(txt): return txt.replace('A','$')
List all Python Programs
Solution
def replacestring(txt): return txt.replace('A','$')