title: simple Python game doesn't work no matter what
body: <p>I been trying to write a Python program that implements the cows bulls game, here's my code:</p>
  
  <pre><code>import random
  def cb():
    pc = random.sample('123456789',4)
    cows = []
    bulls = []
    while True:
      guess = input('please enter a 4 digit num: ')
      cows = rmd(cows)
      bulls = rmd(bulls)
      if pc == guess:
        print('You win!')
        break
      (cows.append(i) for i in pc if i in guess and guess.index(i) == pc.index(i))
      (bulls.append(i) for i in pc if i in guess and guess.index(i) != pc.index(i))
      print ('{} cows and {} bulls'.format(len(cows), len(bulls))
      continue
  </code></pre>
  
  <p>Just the last approach I tried before giving up, before that I wrote more than 50 programs and nothing would work, it would always return 0 cows 0 bulls. I have tried for loops while guess!=pc among hundreds of ideas.. Nothing would work.</p>
  
  <p>rmd is a function that removes duplicate items from a given list by converting it to a set and then converting that set to a list and returns the final list.</p>
  
  <p>It's just a silly game but the fact that nothing works is very depressing..</p>