Yes.
Is writing science or art?
When you're writing you need to follow some rules in order be understood, there's some guidelines on how to avoid complexity to make your ideas as clear as possible to any reader.
But writing is also creative and can communicate and create emotions on the reader's mind! Poetry is a great example of this, but not the only one.
I believe coding can be both: sometimes we want to keep it simple and write the most obvious and boring code we want because we prioritize clarity, sometimes we'd rather focus on writing "beautiful code" and that's also great.
The programming language you choose will help you go one way or another, obviously. But as in natural languages, beauty can be found anyway.