You could use generator expression
Closed this issue · 3 comments
GreatBahram commented
Hello there,
Python str.join method accepts any kind of iterable object so, you could use a generator expression here. However, it is not a big different.
output += "".join(c.value for c in row) + "\n" davecom commented
Hi @GreatBahram,
You're absolutely right, thanks for the suggestion and this would be better. If we do another edition of the book, I will make the change. Because it would make this source code repository diverge from the code from the physical book for a non-error, though, I won't make the change at this time.
Best,
Dave