Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. def fancy_concatenate(multilist):
  2.     all_list = []
  3.     for lists in multilist:
  4.         if len(lists) == 3:
  5.             for anystring in lists:
  6.                 all_list.append(anystring)
  7.     all_list_as_string = "".join(all_list)
  8.    
  9.     print(all_list_as_string)
  10.    
  11. fancy_concatenate([["man", "woman", "boy", "girl"], ["doctor", "a","b"]])
  12. fancy_concatenate([["p","y","t"], ["h","o","n"]])
  13. fancy_concatenate([["p","y"], ["h","o","n"]])
  14. fancy_concatenate([["p","y"], ["h","o"]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement