title: how do i select specific words with vowels from a textfile?
body: <pre><code># Beginning project
  import random
  
  while True:
      g = random.randrange(0,1042)#verbs
      h = random.randrange(0,1435)#noun
      i = random.randrange(0,912) #adjective
      j = random.randrange(0,3)   #person
      k = random.randrange(0,2)   #what
      with open("verbs.txt","r") as z:
          verb = [x.strip().split(" ") for x in z.readlines()]
      with open("nouns.txt","r") as v:
          noun = [x.strip().split(" ") for x in v.readlines()]
      with open("adjectives.txt","r") as a:
          adject = [x.strip().split(" ") for x in a.readlines()]
      with open("person.txt","r") as b:
          who = [x.strip().split(" ") for x in b.readlines()]
      with open("what.txt","r") as c:
          what = [x.strip().split(" ") for x in c.readlines()]
  file = open("written.txt","a")
  
  output = (who[j] + verb[g] + what[k] + adject[i] + noun[h])
  print(output)
  file.write(str(output) + "\n")
  </code></pre>
  
  <p>Thats my code so far.
  I have 6 textfiles each have seperate types of words
  Eg verbs, adjectives, nouns, who and what and the last one named written is where it outputs to.</p>
  
  <p>I want to do something like this:
  If vowel found in noun then use an 
  Or if vowel not found in noun then use a</p>
  
  <p>But in code
  In python 2.7.12</p>