Pretty sure this has come up aleady but have not found a recent discussion where this was covered.
In lesson 16, the user is tasked to created a function which concatenates words and is expected to use a for loop. Why is the user encouraged to do this task in a non-optimal way?
The excercise is marked successfully using the following code
n = ["Michael", "Lieberman"] # Add your function here def join_strings(words): result = '' for word in words: result += word return result print join_strings(n)
the problem with this is that it shows poor programming skills. Even if you argue that it should demonstrate a different concept, this example doesn't lend itself very well to demonstrate without mentioning that this is not the way beginners are advised to concatenate strings. At least mention the more pythonic way, which is to use the .join built in function.