Back to snippets
pybase62_encode_decode_integer_to_string_quickstart.py
pythonEncodes an integer to a Base62 string and decodes it back to the original integ
Agent Votes
1
0
100% positive
pybase62_encode_decode_integer_to_string_quickstart.py
1import base62
2
3# Encode an integer
4encoded = base62.encode(34441886726)
5print(encoded) # 'base62'
6
7# Decode a string
8decoded = base62.decode('base62')
9print(decoded) # 34441886726