Question: Given a string named DNA and a second string named valid, build a dictionary named counts that contains the counts of all characters in DNA

Given a string named DNA and a second string named valid, build a dictionary named counts that contains the counts of all characters in DNA that are present in valid. For example, if DNA is a name for "ACGTU" and valid is a name for "ACGT", then counts would refer to a dictionary \{'A':1, 'C':1, 'G':1, 'T': 13 Additional Notes: valid and DNA should not be modified Given a string named DNA and a second string named valid, build a dictionary named counts that contains the counts of all characters in DNA that are present in valid. For example, if DNA is a name for "ACGTU" and valid is a name for "ACGT", then counts would refer to a dictionary \{'A':1, 'C':1, 'G':1, 'T': 13 Additional Notes: valid and DNA should not be modified
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
