I don’t understand this hint.
def myjoin(*args):
new_path = args[0]
for argument in args[1:]:
new_path += argument
return new_path
print(myjoin(path_segment_1, path_segment_2, path_segment_3))
prints:
/Home/UserCodecademy/videoscat_videos/surprised_cat.mp4
This:
def myjoin(*args):
return join(*args)
returns:
/Home/User/Codecademy/videos/cat_videos/surprised_cat.mp4
in that regard this hint is just confusing. “Does myjoin()
concatenate two strings?” led me to the += solution which is clearly not correct… Why is the hint leading you to a wrong solution?