Some languages like Java, Verilog have both bitwise logical (<<, >>) and arithmetic shift (<<<, >>>) operators.
For unsigned values, logical and arithmetic shifts have identical operation. Say if 8'b11000101 is binary representation of 8-bit unsigned number 197, then
8'b11000101 >> 2 => 8'b00110001
8'b11000101 >>> 2 => 8'b00110001
8'b11000101 << 2 => 8'b00010100
8'b11000101 <<< 2 => 8'b00010100
For signed values, only the arithmetic and logical left shift operations are identical but arithmetic right shift leads to sign extension. Say if 8'b11000101 is binary representation of 8-bit signed number -59, then
8'b11000101 >> 2 => 8'b00110001
8'b11000101 >>> 2 => 8'b11110001
8'b11000101 << 2 => 8'b00010100
8'b11000101 <<< 2 => 8'b00010100
Python only has logical shift operators but no arithmetic shift operators. So how to achieve arithmetic right shift in python for signed and unsigned values ?