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: "+++".
Exercise 2-b: Join method of strings w/tuples
Join the tuple's elements so that you get a proper email address.
Exercise 2-c: Join method with a special character
Join each element in the list with a space character: " "
Exercise 2-d: Join method of strings w/dictionaries
Using .join() method join the keys in the dictionary with a comma: ",".
Exercise 2-e: Python join method with new line character
"\n" is a character that creates a new line. (Similar to when you press enter key in your text editor.)
Using "\n" character and .join() method, join the sentences in the list so that it looks like a proper poem.