Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- firstnames = ['Anthony','Timothy']
- lastname = ['Smith','Parker']
- temporarylist = []
- a = 0
- b = 0
- c = 0
- for item in lastname:
- for item in firstnames:
- temporarylist.insert(c, firstnames[a] + lastname[b])
- print(temporarylist)
- a = a + 1
- c = c + 1
- if a > len(firstnames) - 1:
- b = b + 1
- a = 0
- file = open("Families.txt",'a')
- file.write(lastname[b] + "/n")
- file.close()
- print(lastname[b], '=', temporarylist)
- file = open(lastname[b] + 'txt', 'w')
- temporarylist = str(temporarylist)
- file.write(temporarylist)
- temporarylist = []
- file.close()
- b = b + 1
- a = 0
- c = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement