Anonymous user
Determine if a string is numeric: Difference between revisions
m
→Python: Most numeric literals
(→Python: Most numeric literals: code refactoring, made it a **boolean** function) |
|||
Line 2,463:
lambda s: int(s,2), #binary
lambda s: int(s,8), #octal
lambda s: int(s,16)] #
for cast in castings:
try:
|