| ▲ | vintagedave a day ago | |||||||||||||
Beautiful. Far more so than Python’s "stressed"[::-1] (which I also think is very neat.)Oddly given the comments on Pascal it reminds me most of Pascal’s range syntax. I love its ranges and sets. | ||||||||||||||
| ▲ | Someone a day ago | parent [-] | |||||||||||||
> Beautiful. Far more so than Python’s "stressed"[::-1]" “stressed" [8..1]” Looks better, but IMO is worse, as it requires you to know the length of the string. Change the string and forget to update the indexing expression and you’ve got a (possibly silent) bug. Having said that, Python IMO may be too powerful here, allowing, for example
Makes perfect sense (from the fifth character from the end, step back 3 characters at a time until you reach the 10th character), but may be too cryptic for some. | ||||||||||||||
| ||||||||||||||