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


#1



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.


#2

In the exercise or in general?


#3

in general!

or is it only in the exercise?


#4

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

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

join just joins a list into a string


#5

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