0

Is it possible to compare user input after every keystroke(without hitting enter) with a list of strings?

example:

words = "house, mouse, music, halo,"
first_user_keystroke = h
second_user_keystroke = a

Then if only one possible match, in this case "halo", ad this string to variable.

Mazdak
  • 105,000
  • 18
  • 159
  • 188
kong king
  • 1
  • 1
  • Have a look at : https://stackoverflow.com/questions/510357/python-read-a-single-character-from-the-user – Rohi Apr 30 '18 at 13:06
  • Maybe the [cmd module](https://docs.python.org/3.5/library/cmd.html) is what you want. – MegaIng Apr 30 '18 at 13:30

0 Answers0