import sqlite3


def get_sql_tables(conn, verbose=False):
    """
    Returns list of SQL tables found in a database

    Parameter
    --------------------------------------------------------
    conn : sqlite3.Connection
                returns sqlite3 connection object
    verbose: bool
                prints detail output of connection

    Returns
    --------------------------------------------------------
    tables : list
                returns python lists of tables
     """
    try:
        curs = conn.cursor()
        curs.execute("SELECT name FROM sqlite_master WHERE type='table';")
        tables = curs.fetchall()

        if verbose:
            print('-------------- TABLES IN SQLITE3 DATABASE --------------')
            for row in tables:
                print(row)
        return tables
    except sqlite3.Error as e:
        print(e)