— Send in admin group, seems a bit long
— He wants, for example, in f(5) to be '12345', yours shows only '1234' 🤔
— Pretty long as i see
"".join(map(str, range(1,x + 1)))
is shorter
— I was using list comprehension so if he asks, it would be easy to explain... but, please don't show the solution until OP already try to solve it by himself
Message permanent page
— But let's not give him code he won't be able to explain
— Can be made shorter if you disregard any style guides :P
— I know, but map here seems more obvious . Btw both solutions are not suitable for student his leve.