human
Can you show me a Python code to sqlite table names in database.
assistant
Here is a Python code to sqlite table names in database

import sqlite3

def get_table_names(db_name):
        """Returns a list of table names in a database.

        :param db_name: Database name.
        :type db_name: str
        """

        conn = sqlite3.connect(db_name)
        cursor = conn.cursor()
        cursor.execute("SELECT name FROM sqlite_master WHERE type='table';")
        return [row[0] for row in cursor.fetchall()]

# Enter the database name
db_name = "test.db"

# Calling the function
print((get_table_names(db_name)))

#Example Output
# []

#Remember to inspect code for bugs.