I'm trying to find all possible combinations of a string while substituting some characters in the string using a dictionary. I have to accomplish this goal without importing any modules. Here is an example:
myDict = {'R':'AG', 'Y':'CT', 'M':'CA', 'G':'G', 'D':'ATG', 'A':'A'}
myString = "ARD"
So I want to write out all the possible combinations of myString using the above dictionary which should be "AAA","AAT","AAG","AGA","AGT","AGG"
I can't figure out how to iterate for each characters in the string and then put them in a list or something.