# Author: Scott Wehrwein
# Date: 05/19/2025
# L16 other practice problems

def censor(text, words):
    """ Return a copy of text (a string) with all instances of each string in words
    (a list of strings) removed. """
    for word in words:
        text.replace(word, "")


def is_sorted(my_list):
    """ Return true if and only if my_list is in sorted (ascending) order.
    Precondition: my_list contains all numbers OR all strings, but not a mix. """
    
def split_address(addr_line):
    """ Split the postal address in address_line into its
    component pieces. Return a tuple of strings containing:
        (number, street, city, state, zip).
    Precondition: the address matches the following format:
        "<number> <street>, <city> <state> <zip>"
    Example: split_address("516 High St, Bellingham WA 98225")
    => ("516", "High St", "Bellingham", "WA", "98225") """
    

def grep(string, filename):
    """ Print all lines of the file filename that contain the given string.
    Precondition: the file exists. """