Base convert in python given a string
问题 In PHP, given a string value ( integers separated by chars ), we can calculate its integer representation: $hashable = "123A123"; // notice "A" delim $hash_int = base_convert($hashable, 11, 10); echo $hash_int; Output 2151042 It's useful because result is unique for huge range of strings (short ones, of course). I use it for ID generation in my application. How can we do same conversions in python? Is it possible to generate equal integers for same strings in both PHP and python? Maybe first