@mdszy Put it in a function? Then the ugliness is hidden and your code makes more sense upfront.
@OTheB in this context, it's not a fully fledged program where I'm doing this
In the software it's a little input where you can use expressions to do rudimentary operations on strings and numbers, all self contained and very basic, so no functions in this context
Elsewhere the software just uses straight python but yeah
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!