def select_columns_by_type(df, dtypes):
    """Return the list of columns which are of object or datetime type
    
    Parameters
    ----------
    df: pandas.DataFrame
    
    Returns
    -------
    List[str]
    """
    return [
        column_name
        for column_name, column_type in df.dtypes.to_dict().items()
        if column_type in dtypes
    ]