title: Python - Adding something to a list only once
body: <p>my problem is that I only want to add the string "Karte1" once to a list. But right now, the string "Karte1" is adding to a list unlimited times..
  Hope u can help me :)</p>
  
  <pre><code>import random
  
  Deck1 = []
  
  def startgame():
      try:
          "Karte1" not in Deck1
          if True:
              Deck1.append("Karte1")
          if False:
              pass
      except:
          pass
  
  
  while True:
      startgame()
      print(Deck1)
  </code></pre>