title: How to swap two widgets' x position in tkinter?
body: <p>I need to create a function that takes as a parameter two widgets and the frame they are placed.
  I want to swap their X position, but I can't figure out the correct way of doing it. This is what I tried:</p>
  <pre><code>def swap(w1, w2, frame):
      x1 = w1.winfo_x()
      x2 = w2.winfo_x()
      w1.place(x=x2)
      w2.place(x=x1)
      frame.update()
  </code></pre>
  <p>What's the right way of doing this? Is this the right approach?</p>