input: Write a python function to fetch and print all table names from a MySQL database using pymysql.
  assert fetch_table_names() == ['table1', 'table2', 'table3']
  assert fetch_table_names() == ['users', 'products', 'orders']
  assert fetch_table_names() == ['employees', 'departments', 'salaries']
output: def fetch_table_names():
      import pymysql
  
      # Database connection details
      connection = pymysql.connect(
          host='localhost',
          user='your_username',
          password='your_password',
          db='your_database'
      )
  
      try:
          with connection.cursor() as cursor:
              # Execute SQL query to fetch table names
              cursor.execute("SHOW TABLES")
              result = cursor.fetchall()
              # Extract table names from the result set
              table_names = [row[0] for row in result]
              return table_names
      finally:
          connection.close()