Aug-09-2020, 07:02 PM
No worries,
Since you mentioned that the code comes from the book - i have just had a look at it again - in fact you can get the code working with ,,return " ",, too.
Have a look at the code in your book and see how exactly is ,,return " ", indented..
The way it was indented in your original code it was in fact part of the loop and hence causing trouble.
Therefore, the code in book is not necessarily misleading :)
Since you mentioned that the code comes from the book - i have just had a look at it again - in fact you can get the code working with ,,return " ",, too.
Have a look at the code in your book and see how exactly is ,,return " ", indented..
The way it was indented in your original code it was in fact part of the loop and hence causing trouble.
Therefore, the code in book is not necessarily misleading :)