How do I write concise and clean code?

I’m a young developer (18) and I’m wondering how you develop solutions to puzzles like these which are concise and clean. All my solutions are quite long and complex and when I see other peoples I’m always amazed at how short they are. I never seem to be able to write code like that. Is it just practice?

Practice indeed. Among other stuff.

Have you tried looking at others 'solutions?

Yeah although I don’t always understand them. The so called ‘easy’ puzzles I find a challenge and I code a lot haha