I have a problem in python3 .I want to print the "#" in only one line when I push "a" button in keyboard ,but with this code when I push for example 10 times the "a" ,doesn't appear the "#" ,but when I push the "q" button ,all "#" appears. Why is this happening? Also,in print function it shows me wrong the -> end=" " Code:
import getch
while True:
char = getch.getch()
if(char == 'a'):
print('#', end=" ")
elif(char == "q"):
break