6. printing pretty - does the join function need a print? and why?


I have already passed this part. I just need to understand a concept which is this:

  1. Does the join command always need a print command?
    I cant seem to get the join function to work without the print command.

  2. why is it that the join command needs a print command to work?
    in other words, wouldnt it be equivalent if i join 1st, then print them?

Replace this line with your code.


In the exercise or in general?


in general!

or is it only in the exercise?


in general you don't need to use print with join:

x = "".join(["hello", "world"])

join just joins a list into a string


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.