79806460

Date: 2025-11-01 10:16:04
Score: 0.5
Natty:
Report link

Coma was missed in (6). That's why TypeError was about int. Silly mistake. The solution was found during the writing process:

sum([(1,2,3),(4,5),(6,)], start=())

(1, 2, 3, 4, 5, 6)

itertools.chain is also well known solution, but without sum function

from itertools import chain

tuple(chain(*[(1,2,3),(4,5),(6,)]))
# or
tuple(chain( (1,2,3),(4,5),(6,) ))
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: leofun01