Coding Challenge: Implement Pattern Matching
Use the knowledge from the last lesson to perform the following exercise.
We'll cover the following...
Pattern lookup
Pattern Matching Problem
Problem overview:
Find all occurrences of a pattern in a string.
Input: Strings Pattern and Genome.
Output: All starting positions in Genome where Pattern appears as a sub-string.
Press + to interact
def PatternMatching(Genome, Pattern):positions = []## Write you code herereturn positions