I have some code which produces a sort of grid of letters that I want to scroll across- (that bit's not important I don't think). At the moment the 'scrolling' function works but only if you type in 'r' and then the key.
Is there a way of making it so that as soon as you hit 'r' it's 'entered' and the program responds?
This is a tiny bit of the code.
print('Enter [r] for right and [l] for left:')
input_val = raw_input('Left or Right: ')
if input_val == 'r':
a += 10
b += 10