Why use ''.join() in chapter 14, solution 1, find_orfs()?
singing-scientist opened this issue · comments
Chase W. Nelson|倪誠志 commented
For the following line in chapter 14, solution 1, find_orfs(), from page 281:
orfs.append(''.join(aa[start:stop]))
Could you help me understand why one would not use the following (presumably simpler?):
orfs.append(aa[start:stop])
In other words, what is the advantage of joining on the empty string in this situation?
Thanks as always!
Chase
Ken Youens-Clark commented
Chase,
Actually, there are no advantages, and leaving out the join correct. I must have been thinking about ensuring this was a str
and not a list
. Thanks for the catch.
Ken