title: Tkinter dropdown menu & MySql database input
body: <p>first time posting here so not sure how this work, but here is the issue I'm currently on.
  I'm making a database GUI application in python using Tkinter and MySQL.
  I'm stuck on drop-down menus. The issue I'm having is that when I create a list or a dictionary for the drop-down menu I want it to be a word example(One) but when it's going to be entered in the database it should be a number e if that makes sense. Here is the code i have so far </p>
  
  <pre><code>from tkinter import *
  from tkinter import ttk
  from tkinter import messagebox
  import mysql.connector
  from mysql.connector.errors import Error
  
  
  root = Tk()
  root.title("Account Tool 0.0.1a")
  root.geometry("640x640")
  # =======================================================================================================
  account_db = mysql.connector.connect(
     host="localhost",
     user="root",
     passwd="123456",
     port="3310",
     database="realmd",
  )
  my_cursor = account_db.cursor()
  exp_var = StringVar()
  data = [
     "Mazda",
     "Volvo",
     "YUGO",
  ]
  
  exp_var.set("Mazda")
  # add acccount
  def add_account():
     account = "INSERT INTO `account` (`id`, `username`, `sha_pass_hash`, `sessionkey`, `v`, `s`, `totp_secret`, `email`, `reg_mail`, `joindate`, `last_ip`, `last_attempt_ip`, `failed_logins`, `locked`, `lock_country`, `last_login`, `online`, `expansion`, `mutetime`, `mutereason`, `muteby`, `locale`, `os`, `recruiter`) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"
     v_account = (
     '', e_username.get(), e_password.get(), '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
     '', '', '', '', '',)
  
     my_cursor.execute(account, v_account)  # account_lvl, , v_account_lvl
     # commit to db
     account_db.commit()
  
  # Labels
  l_exp = Label(root, text="Car :").grid(row=1, column=1)  # drop down manu
  l_username = Label(root, text="Username: ").grid(row=3, column=1)
  l_passwd = Label(root, text="Password : ").grid(row=4, column=1)
  # entry
  
  drop_exp = ttk.OptionMenu(root, exp_var, *data)
  drop_exp.grid(row=1, column=2)
  e_username = Entry(root, width=20)
  e_username.grid(row=3, column=2)
  e_password = Entry(root, width=20)
  e_password.grid(row=4, column=2)
  
  # button
  
  btn_create = Button(root, text="Create Account", command=add_account)
  btn_create.grid(row=5, column=2)
  
  # end window
  root.mainloop()
  </code></pre>
  
  <p>p.s I know probably some of you will get a heart attack from my code but I started learning just recently thnx for your time and help</p>