from functools import reduce
strint = lambda z: reduce(lambda x, y: x | y, [(ord(str(z)[i]) * (2 ** 8) **
    i) for i in range(len(str(z)))])
strint('abc'[::-1])
bin(strint('abc'[::-1]) & 63)
bin(strint('abc'[::-1]) << 8)
Is it possible to do bitwise operations on a string in Python?