title: I have a problem using [k for k in list if "♦" in k]. I need help :(
body: <p>I have a problem that i tried to solve but failed.
  I'm programming a calculator that can calculate your chances in poker. 
  So i have my cards here:</p>
  
  <pre><code>list = ["♦ Ace", "♦ 2", "♦ 3", "♦ 4", "♦ 5", "♦ 6", "♦ 7", "♦ 8", "♦ 9", "♦ 10", "♦ Jack", "♦ Queen", "♦ King",
          "♣ Ace", "♣ 2", "♣ 3", "♣ 4", "♣ 5", "♣ 6", "♣ 7", "♣ 8", "♣ 9", "♣ 10", "♣ Jack", "♣ Queen", "♣ King",
          "♥ Ace", "♥ 2", "♥ 3", "♥ 4", "♥ 5", "♥ 6", "♥ 7", "♥ 8", "♥ 9", "♥ 10", "♥ Jack", "♥ Queen", "♥ King",
          "♠ Ace", "♠ 2", "♠ 3", "♠ 4", "♠ 5", "♠ 6", "♠ 7", "♠ 8", "♠ 9", "♠ 10", "♠ Jack", "♠ Queen", "♠ King"]
  </code></pre>
  
  <p>so it should filter all of the cards with:</p>
  
  <pre><code>Diamonds = [k for k in list if "♦" in k]
  Hearts   = [k for k in list if "♥" in k]
  Spades   = [k for k in list if "♠" in k]
  Clubs    = [k for k in list if "♣" in k]
  </code></pre>
  
  <p>So i give the input "♣" and it should tell me all the "♣" that are still in the desk. So in this case:</p>
  
  <pre><code>'♣ Ace', '♣ 2', '♣ 3', '♣ 4', '♣ 5', '♣ 6', '♣ 7', '♣ 8', '♣ 9', '♣ 10', '♣ Jack', '♣ Queen', '♣ King'
  </code></pre>
  
  <p>If i ask the program for all "♦" It works perfectly fine. But if i ask for any other type of card, it still gives the output of "♦".</p>
  
  <p>I use these lines:</p>
  
  <pre><code>card_check = input("Check for card?")
  
              if card_check == "♦" or "♦ ":
                  print(len(Diamonds), Diamonds)
                  card_type_amount = len(Diamonds)
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Diamonds))
                  print(amount)
  </code></pre>
  
  <p>to give me all the information i need.</p>
  
  <pre><code>print(len(Diamonds), Diamonds)
  </code></pre>
  
  <p>gives me how many "♦" are still in the deck and which. In this case: 13 [and all of the "♦"]</p>
  
  <pre><code>amount_2 = div(percent, cards_left)
  </code></pre>
  
  <p>gives me the percent of what the chances are to get exactly the one card i want. (it divides 100 by all the cards left)</p>
  
  <pre><code> amount = times(amount_2, len(Diamonds))
  </code></pre>
  
  <p>this multiplies the chances of getting 1 card with the "♦" cards available. So i have the percent of getting a "♦".</p>
  
  <p>I work on PyCharm, so i don't know if this works with other IDE'S.
  Thanks a lot if someone takes the time to read through this. Im pretty new to programming, so my code shouldn't be insanely complicated. Im completely lost at this point. I have completely no Idea why this couldn't work. I have one guess: The part where the variables are to filter the list. 
  It is really hard to explain this, so i put the full code down here:
  Thanks in advance.</p>
  
  <pre><code>import sys
  
  #div = divides 100 by all the cards left.
  def div( percent, cards_left ):
      return percent / cards_left
  #times = multiplies the chances of getting one specific card with the amount of "♣" there are available
  def times(amount_2, card_type_amount):
      return amount_2 * card_type_amount
  
  #list of colors so its easier for me
  RED     = "\033[1;31m"
  BLUE    = "\033[1;34m"
  CYAN    = "\033[1;36m"
  GREEN   = "\033[0;32m"
  RESET   = "\033[0;0m"
  BOLD    = "\033[;1m"
  REVERSE = "\033[;7m"
  YELLOW  = "\033[1;33m"
  
  #list with all the cards in
  list = ["♦ Ace", "♦ 2", "♦ 3", "♦ 4", "♦ 5", "♦ 6", "♦ 7", "♦ 8", "♦ 9", "♦ 10", "♦ Jack", "♦ Queen", "♦ King",
          "♣ Ace", "♣ 2", "♣ 3", "♣ 4", "♣ 5", "♣ 6", "♣ 7", "♣ 8", "♣ 9", "♣ 10", "♣ Jack", "♣ Queen", "♣ King",
          "♥ Ace", "♥ 2", "♥ 3", "♥ 4", "♥ 5", "♥ 6", "♥ 7", "♥ 8", "♥ 9", "♥ 10", "♥ Jack", "♥ Queen", "♥ King",
          "♠ Ace", "♠ 2", "♠ 3", "♠ 4", "♠ 5", "♠ 6", "♠ 7", "♠ 8", "♠ 9", "♠ 10", "♠ Jack", "♠ Queen", "♠ King"]
  
  #this should filter the list with my output. But only Diamonds work. Maybe here's the problem?
  Diamonds = [k for k in list if "♦" in k]
  Hearts   = [k for k in list if "♥" in k]
  Spades   = [k for k in list if "♠" in k]
  Clubs    = [k for k in list if "♣" in k]
  
  Ace      = [k for k in list if "Ace" in k]
  King     = [k for k in list if "King" in k]
  Queen    = [k for k in list if "Queen" in k]
  Jack     = [k for k in list if "Jack" in k]
  
  Ten      = [k for k in list if "10" in k]
  Nine     = [k for k in list if "9" in k]
  Eight    = [k for k in list if "8" in k]
  Seven    = [k for k in list if "7" in k]
  Six      = [k for k in list if "6" in k]
  Five     = [k for k in list if "5" in k]
  Four     = [k for k in list if "4" in k]
  Three    = [k for k in list if "3" in k]
  Two      = [k for k in list if "2" in k]
  
  #variable for 100
  percent = 100
  
  #the first list in yellow
  sys.stdout.write(YELLOW)
  print(list)
  sys.stdout.write(RESET)
  
  #the cards in your hand you get every round.
  player_card1 = input("Which first card did you get?")
  player_card2 = input("Which second card did you get?")
  
  #these remove the cards from the list, so you know the cant come again. This program only works if the cards that got used don't get shuffled back in.
  list.remove( player_card1 )
  list.remove( player_card2 )
  
  #for while loops
  card_input = True
  player = True
  
  while player == True:
  
      while card_input == True:
  
          #to remove the card that gets pulled every round. This is Texas Hold-em.
          pulled_card = input("Which card got pulled??")
          if pulled_card in list:
              list.remove(pulled_card)
  
              #to print all the cards that are still in the deck and which.
              sys.stdout.write(YELLOW)
              print(len(list),list)
              sys.stdout.write(RESET)
  
              cards_left = len(list)
  
              sys.stdout.write(RED)
  
              #this is the tricky part. I have no clue why only the Diamonds work. The others are perfect copies.
              card_check = input("Check for card?")
  
              if card_check == "♦" or "♦ ":
                  print(len(Diamonds), Diamonds)
                  card_type_amount = len(Diamonds)
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Diamonds))
                  print(amount)
  
              elif card_check == "♥" or "♥ ":
                  print(len(Hearts), Hearts)
                  card_type_amount = len(Hearts)
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Hearts))
                  print(amount)
  
              elif card_check == "♠" or "♠ ":
                  print(len(Spades), Spades)
                  card_type_amount = Spades
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Spades))
                  print(amount)
  
              elif card_check == "♣" or "♠ ":
                  print(len(Clubs), Clubs)
                  card_type_amount = Clubs
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Clubs))
                  print(amount)
  
              elif card_check == "Ace":
                  print(len(Ace), Ace)
                  card_type_amount = Ace
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Ace))
                  print(amount)
  
              elif card_check == "King":
                  print(len(King), King)
                  card_type_amount = King
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(King))
                  print(amount)
  
              elif card_check == "Queen":
                  print(len(Queen), Queen)
                  card_type_amount = Queen
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Queen))
                  print(amount)
  
              elif card_check == "Jack":
                  print(len(Jack), Jack)
                  card_type_amount = Jack
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Jack))
                  print(amount)
  
              elif card_check == "10":
                  print(len(Ten), Ten)
                  card_type_amount = Ten
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Ten))
                  print(amount)
  
              elif card_check == "9":
                  print(len(Nine), Nine)
                  card_type_amount = Nine
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Nine))
                  print(amount)
  
              elif card_check == "8":
                  print(len(Eight), Eight)
                  card_type_amount = Eight
                  amount_2 = div(percent, cards_left)
                  amount = times(amount_2, len(Eight))
                  print(amount)
  
                  # i didn't fully write this out but here would come from 7-2
  
  
  
  
  
              sys.stdout.write(RESET)
              sys.stdout.write(BLUE)
  
              #a last time the percent of getting one specific card before the while loop starts again.
              print(div(percent, cards_left))
  
              sys.stdout.write(RESET)
  
              player = True
  
  </code></pre>