A bit shift is a procedure that takes a binary string and moves the digits either left or right, wrapping digits around as required; e.g. a left shift of 1 applied to 10011 gives 00111, and a left-shift of 2 gives 01110.
Write function bitshift(s,k,b) that takes a string s, an integer k, and a Boolean b, and returns s shifted by k, left if b is True, and right otherwise.
What will be the output of bitshift("110011",2,True)
For example:
TestResultprint(bitshift("10011",1,True))
00111
print(bitshift("110011",2,True))
001111