fork download
  1. f = ["Anthony", "Timothy", "Sean", "Jim"]
  2. l = ["Smith", "Parker", "Cameron"]
  3. h = ["Adolf","Natasha","Vasya"]
  4. c = []
  5. for supername in h:
  6. for name in f:
  7. for surname in l:
  8. c.append(name + surname + supername)
  9. print(c)
Success #stdin #stdout 0.03s 9984KB
stdin
Standard input is empty
stdout
['AnthonySmithAdolf', 'AnthonyParkerAdolf', 'AnthonyCameronAdolf', 'TimothySmithAdolf', 'TimothyParkerAdolf', 'TimothyCameronAdolf', 'SeanSmithAdolf', 'SeanParkerAdolf', 'SeanCameronAdolf', 'JimSmithAdolf', 'JimParkerAdolf', 'JimCameronAdolf', 'AnthonySmithNatasha', 'AnthonyParkerNatasha', 'AnthonyCameronNatasha', 'TimothySmithNatasha', 'TimothyParkerNatasha', 'TimothyCameronNatasha', 'SeanSmithNatasha', 'SeanParkerNatasha', 'SeanCameronNatasha', 'JimSmithNatasha', 'JimParkerNatasha', 'JimCameronNatasha', 'AnthonySmithVasya', 'AnthonyParkerVasya', 'AnthonyCameronVasya', 'TimothySmithVasya', 'TimothyParkerVasya', 'TimothyCameronVasya', 'SeanSmithVasya', 'SeanParkerVasya', 'SeanCameronVasya', 'JimSmithVasya', 'JimParkerVasya', 'JimCameronVasya']