import random adjectives = open('adjectives.txt').read().strip().split('\n') nouns = open('nouns.txt').read().strip().split('\n') numiters = raw_input("How many insults would you like? ") for i in range(int(numiters)): randnoun = nouns[random.randrange(0, len(nouns))] randadj = adjectives[random.randrange(0, len(adjectives))] print randadj + " " + randnoun + "\n"