I am trying to take count of how many times the user pressed the backspace key while giving input. I am using the following code but it doesn't seem like working for me any help would be appreciated TIA.
word = input()
count = 0
for letter in word:
if keyboard.is_pressed('\b'):
count += 1
print(count)