Write a boolean python function to check if a given string matches a given pattern


Topic: Write a boolean python function to check if a given string matches a given pattern

Solution

import re
def match(pattern, string):
    if re.match(pattern, string):
        return True
    return False



List all Python Programs