fork download
  1. first = ["fuck", "you", "bitch"]
  2. second = ["love", "my", "live"]
  3. third = ["sex", "drugs", "rock"]
  4. comb = []
  5.  
  6. print(["".join(tup) for tup in zip(first, second, third)])
  7.  
  8. for i in range(len(first)):
  9. comb.append(first[i] + second[i] + third[i])
  10. print(comb)
  11.  
  12. first = ["fuck", "you", "bitch", "horse", "carrot"]
  13. second = ["love", "my", "live"]
  14. third = ["sex", "drugs", "rock", "ai"]
  15. comb = []
  16. for i in range(len(first)):
  17. comb.append(first[i % len(first)] + second[i % len(second)] + third[i % len(third)])
  18. print(comb)
  19.  
  20.  
  21. comb = []
  22. for a in first:
  23. for b in second:
  24. for c in third:
  25. comb.append(a + b + c)
  26. print(comb)
  27.  
  28.  
  29. f = ["Anthony", "Timothy", "Sean", "Jim"]
  30. l = ["Smith", "Parker", "Cameron"]
  31. c = []
  32.  
  33. for surname in l:
  34. for name in f:
  35. c.append(name + surname)
  36. print(c)
  37.  
  38.  
  39. c = []
  40. for name in f:
  41. for surname in l:
  42. c.append(name + surname)
  43. print(c)
Success #stdin #stdout 0.03s 9984KB
stdin
Standard input is empty
stdout
['fucklovesex', 'youmydrugs', 'bitchliverock']
['fucklovesex', 'youmydrugs', 'bitchliverock']
['fucklovesex', 'youmydrugs', 'bitchliverock', 'horseloveai', 'carrotmysex']
['fucklovesex', 'fucklovedrugs', 'fuckloverock', 'fuckloveai', 'fuckmysex', 'fuckmydrugs', 'fuckmyrock', 'fuckmyai', 'fucklivesex', 'fucklivedrugs', 'fuckliverock', 'fuckliveai', 'youlovesex', 'youlovedrugs', 'youloverock', 'youloveai', 'youmysex', 'youmydrugs', 'youmyrock', 'youmyai', 'youlivesex', 'youlivedrugs', 'youliverock', 'youliveai', 'bitchlovesex', 'bitchlovedrugs', 'bitchloverock', 'bitchloveai', 'bitchmysex', 'bitchmydrugs', 'bitchmyrock', 'bitchmyai', 'bitchlivesex', 'bitchlivedrugs', 'bitchliverock', 'bitchliveai', 'horselovesex', 'horselovedrugs', 'horseloverock', 'horseloveai', 'horsemysex', 'horsemydrugs', 'horsemyrock', 'horsemyai', 'horselivesex', 'horselivedrugs', 'horseliverock', 'horseliveai', 'carrotlovesex', 'carrotlovedrugs', 'carrotloverock', 'carrotloveai', 'carrotmysex', 'carrotmydrugs', 'carrotmyrock', 'carrotmyai', 'carrotlivesex', 'carrotlivedrugs', 'carrotliverock', 'carrotliveai']
['AnthonySmith', 'TimothySmith', 'SeanSmith', 'JimSmith', 'AnthonyParker', 'TimothyParker', 'SeanParker', 'JimParker', 'AnthonyCameron', 'TimothyCameron', 'SeanCameron', 'JimCameron']
['AnthonySmith', 'AnthonyParker', 'AnthonyCameron', 'TimothySmith', 'TimothyParker', 'TimothyCameron', 'SeanSmith', 'SeanParker', 'SeanCameron', 'JimSmith', 'JimParker', 'JimCameron']