What is the cleanest way to obtain the numeric prefix of a string in Python?
By \"clean\" I mean simple, short, readable. I couldn\'t care less about performance, a
Here is my way:
output = input[:next((i for i,v in enumerate(input) if not v.isdigit()),None)]