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