By "shorten" I assume you mean to have less number of lines, right?
It's not less number of characters (e.g. by shortening variable names, such as power -> p).
It's not shortening execution time (i.e. making the code run faster).
You could do
print(int(input('Enter a binary code: '), 2))See why, here.