title: How do I do something to each element in a list?
body: <p>I am currently making a bingo game that calls a number when enter is pressed. It does this until the player's bingo card is empty. </p>
  
  <p>I can not get it so that it calls the first number in the list of numbers and goes on to the second then the third and so on without making a script for each of the 99 numbers.</p>
  
  <p>What I want to do is get the program to find the first element of <code>nums</code> and then get the program to print the string and if the string is in the <code>player_1</code> list then remove the string from <code>player_1</code> and keep on doing the process until either the program has gone through all the strings or the <code>player_1</code> list has no strings left in the list.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import random
  
  def player_1_card():
     print(player_1[1:4])
     print(player_1[5:8])
     print(player_1[9:12])
     print(player_1[13:16])
  return
  
  nums = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99']
  
  random.shuffle(nums)
  player_1 = random.sample((nums), 16)
  
  while len(player_1) != 0:
          input("Press &lt;enter&gt; to call a number")
          for i in nums:
              print("Your current bingo card:")
              player_1_card()
              print("Number called is", # )
              input("Press &lt;enter&gt; to call a number")
              if nums(#) in player_1:
                  nums.remove(#)
  </code></pre>
  
  <p>I have placed hashes where I need some help with the code.</p>
  
  <p>I am using Python 3.5.2.</p>