Skip to main content
added 78 characters in body
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62

Python 3, 4546 45 42 bytes

f=lambda s:s>''ands>[]and 10*ford(s[:-1])+ords.pop(s[-1]))-4848+10*f(s)

Try it online!Try it online!

-1 thanks to Sisyphus

-3 taking a list of characters as input thanks to ovs

Python 3, 45 bytes

f=lambda s:s>''and 10*f(s[:-1])+ord(s[-1])-48

Try it online!

-1 thanks to Sisyphus

Python 3, 46 45 42 bytes

f=lambda s:s>[]and ord(s.pop())-48+10*f(s)

Try it online!

-1 thanks to Sisyphus

-3 taking a list of characters as input thanks to ovs

added 24 characters in body
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62

Python 3, 4645 bytes

f=lambda s:s!=''ands>''and 10*f(s[:-1])+ord(s[-1])-48

Try it online!Try it online!

-1 thanks to Sisyphus

Python 3, 46 bytes

f=lambda s:s!=''and 10*f(s[:-1])+ord(s[-1])-48

Try it online!

Python 3, 45 bytes

f=lambda s:s>''and 10*f(s[:-1])+ord(s[-1])-48

Try it online!

-1 thanks to Sisyphus

Source Link
att
  • 21.7k
  • 2
  • 16
  • 62

Python 3, 46 bytes

f=lambda s:s!=''and 10*f(s[:-1])+ord(s[-1])-48

Try it online!