title: I need help for how to enter digits into my calculator from left to right?
body: <p>I have made a calculator in tkinter python. When I want to type in 21, it types 12 because of the way the digits are entered into the entry box. I want to correct that.</p>
  
  <p>I have tried tag-right but it doesn't work for entry label.</p>
  
  <p>"""
  Created on Thu Sep 19 17:49:21 2019</p>
  
  <p>@author: Ishita
  """
      x = 0</p>
  
  <pre><code>def add_one():
      if(x == 0):
          entry1.insert(0, "1")
      elif(x == 1):
          entry2.insert(0, "1")
  
  .
  .
  .
  .
  def next_num():
      global x
      x = 1
  
  def add_num():
      result["text"] = ""
      num1 = entry1.get()
      num2 = entry2.get()
      output = int(num1) + int(num2)
      result["text"] = str(output)
  .
  .
  .
  .
  def clear_nums():
      entry1.delete(0, "end")
      entry2.delete(0, "end")
      result["text"] = ""
      global x
      x = 0
  
  import tkinter as tk
  from tkinter import *
  
  calc = tk.Tk()
  calc.title("Basic Calculator")
  calc.geometry("300x600")
  calc.config(background="white")
  
  mainframe1 = tk.Frame(calc)
  mainframe1.pack()
  
  entry1 = tk.Entry(mainframe1, width=3, background="white", font="Times 20")
  entry1.insert("end", " ")
  entry1.configure(justify="right")
  entry2 = tk.Entry(mainframe1, width=3, background="white", font="TImes 20")
  entry2.insert("end", " ")
  entry2.configure(justify="right")
  result = tk.Label(mainframe1, width=3, font="Times 20")
  
  
  button1 = tk.Button(mainframe1, height=2, width=4, background="white", text="1", font="Times 20", command=add_one)
  
  calc.mainloop()
  </code></pre>
  
  <p>On typing 1 and 2, the entry box should give 12 but it gives 21. The numerical entries are happening with the numbers on the application(not with keyboard).</p>