title: Read in a list of random names, past tense verbs and fruits and randomly create sentences
body: <p>This python program is requiring me to read in a list of random names fruits and verbs and then sort them into a list and print out random sentences that make sense. I am struggling how to produce the random sentences. I have the lists sorted, but it states 'pick' is not defined. </p>
  
  <p>here is my function:</p>
  
  <pre><code>def getData():
      list = []
      name_list = []
      fruit_list = []
      verb_list = [] 
  
  name_input = input()
  fruit_input = input()
  verb_input = input()
  
  seperator = ','
  
  namestr = name_input.split(seperator)
  fruitstr = fruit_input.split(seperator)
  verbstr = verb_input.split(seperator)
  
  name_list.append(namestr)
  fruit_list.append(fruitstr)
  verb_list.append(verbstr)
  
  list = name_list + fruit_list + verb_list
  
  return list
  </code></pre>
  
  <p>here is the main function that creates the sentence(given in the problem):</p>
  
  <pre><code>def main():
      seed = int(input())
      print("The seed is", seed)
      names,verbs,fruit = getData()
      print("NAMES:", names)
      print("VERBS:", verbs)
      print("FRUIT:", fruit)
      random.seed(seed)
      for i in range(10):
          n = pick(names, random.randint(1,1000))
          v = pick(verbs, random.randint(1,1000))
          f = pick(fruit, random.randint(1,1000))
      print(n,v,"the",f)
  
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>The seed is 42
   NAMES: ['Adam', 'Betty', 'Charlie', 'Debbie', 'Elaine', 'Frank' 'George', 'Harry', 'Igor', 'Jack', 'Kevin', 'Larry', 'Moe', 'Nancy', 'Ophelia', 'Phil', 'Quentin']
  
  VERBS: ['had', 'found', 'got', 'made', 'knew', 'took', 'saw', 'wanted', 'used', 'found', 'tried']
  
  FRUIT: ['apple', 'banana', 'cherry', 'date', 'elderberry', 'fig', 'grape']
  
  Traceback (most recent call last):
      File "main.py", line 59, in &lt;module&gt;
          main()
      File "main.py", line 51, in main
          n = pick(names, random.randint(1,1000))
      NameError: name 'pick' is not defined
  </code></pre>
  
  <p>Any help is appreciated :)</p>