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,?'?':1,?'T':1}
Additional Notes: valid and DNA should not be modified
 Given a string named DNA and a second string named valid,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!