human
Elegant way to convert list to hex string
assistant
Here is some code to convert the sum of list `walls` into a hex presentation

hex(sum(b << i for i, b in enumerate(reversed(walls))))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.