title: How do I make a list equal in Python if it has the same strings but in a different order?
body: <p>How can I make a list equal if it has the same strings but in a different order? For an example.. The customer wants a Pineapple and Ham pizza.</p>
  <p>Heres the function for when I makes a pizza for the customer. I add Pineapples than I add Ham to mPlayer.last_pizza list.</p>
  <pre><code>def add_toppings():
      choice_input = input(f&quot;&quot;&quot;
      Toppings:{mPlayer.last_pizza} Baked:{mPlayer.baked}  Sliced:{mPlayer.cut}
                  C - Add Cheese
                  H - Add Ham
                  J - Add Jalapenos
                  P - Add Pineapples
                  A - Add Pepperoni's
                  S - Add Sausages
                  Clear - Clear Toppings
                  Exit - Exit
  
              **** Make a Selection ****
  </code></pre>
  <p>After I exit the add_toppings function to go to the delivering method. I type &quot;1&quot; and the if statement gets executed.</p>
  <pre><code>def delivering(self, e, b, c, d, ):
      print(mPlayer.last_pizza)
      choice_input = input(f&quot;&quot;&quot;
  
                      1 - {self.address}
                      2 - {b}
                      3 - {c}
                      4 - {d}
                      5 - {e}
  
          **** Choose the customer house to deliver the pizza ****
  
      &quot;&quot;&quot;)
      if choice_input == '1' and mPlayer.last_pizza == self.customerdir:
          print(self.name + &quot;: Thank you so much you are a life saviour!&quot;)
          mPlayer.last_pizza.clear()
  </code></pre>
  <p>But if the toppings are in a different order like &quot;Ham&quot;, &quot;Pineapples&quot; the if statement never gets executed.</p>
  <p>How can I make it work even if the toppings aren't in the same order as the customer's list?</p>
  <p>Thank you so much.</p>