3 ms·
That's actually how I started, and `int` has a base parameter. But it's still relatively verbose, due to Python's whole "join-only-takes-strings" thing: d
by TheLoneWolfling 11y ago
That's actually how I started, and `int` has a base parameter.
But it's still relatively verbose, due to Python's whole "join-only-takes-strings" thing:
def valueOf(*values, base=10):
return int("".join(map(str, values)), base=10)
Not to mention it's doing a whole lot of unnecessary work.
- TheLoneWolfling 11y agoWhoops. Miscopied. the second `=10` shouldn't be there.