I just came across a decently written question, that basically shows a method foo()
that takes a list of string as input, and returns a single string.
The OP wanted to know why it gives an error when you go listOfStringsVar = foo()
.
Within 5 minutes, there are like 6 answers all going "the method returns a single string, not list of strings which is expected by listOfStringsVar
".
Now, I feel like close-voting this question. I am just wondering: would that be correct, and if so, with what reason?