Python base 36 encoding

前端 未结 9 994
春和景丽
春和景丽 2020-11-29 03:21

How can I encode an integer with base 36 in Python and then decode it again?

9条回答
  •  情话喂你
    2020-11-29 04:11

    from numpy import base_repr
    
    num = base_repr(num, 36)
    num = int(num, 36)
    

    Here is information about numpy.base_repr.

提交回复
热议问题