title: Switch-case statement in Python
body: <p>I'm tired of trying to make a menu that let's me choose from a dictionary keys and in every value I have the choice. I found that I can use dictionary and get() method, it's working fine, but I should use if else statement after get() to execute a function that answers the user choice. Can I do it better? Maybe using a lambda inside the key value?</p>
  <pre><code>def menu():
          print(&quot;Welcome to Our Website&quot;)
          choises={
              1:&quot;Login&quot; ,
              2:&quot;Register&quot;,
          }
          for i in choises.keys(): # Loop to print all Choises and key of choise ! 
              print(f&quot;{i} - {choises[i]}&quot;)
          arg=int(input(&quot;Pleasse Chose : &quot;))
          R=choises.get(arg,-1)
          while R==-1:
              print(&quot;\n Wrong Choise ! Try again ....\n&quot;)
              menu()
          else:
              print(f&quot;You Chosed {R}&quot;)
              if R==1:
                  login()
              if R==2:
                  register()
  
  
  def register():
      print(&quot;Registration Section&quot;)
  def login():
      print(&quot;Login Section&quot;)
      
      
  menu()   
  </code></pre>