Python Join Exercises

Let’s check out some exercises that will help you understand .join() method better.

Exercise 2-a: Join method of strings w/lists

Join the list's elements with: "+++".


“”.join(list) can be used to join elements of a list (or another iterable such as, tuples or dictionaries). Joining character goes inside the brackets and list goes inside the parenthesis.

joined = "+++".join(lst)

Exercise 2-b: Join method of strings w/tuples

Join the tuple's elements so that you get a proper email address.


“”.join(list) can be used to join elements of a list (or another iterable such as, tuples or dictionaries). Joining character goes inside the brackets and list goes inside the parenthesis.

email = "@".join(addresses)