The Qt library has a QCompleter class, which allows you to offer autocompletion to the input word in the input fields. This class is also supported by the PyQt5 library.
In the minimum, the application of this class might look like this:
# Create an input field
lineEdit = QLineEdit(self)
strList = ['Python', 'PyQt5', 'Qt', 'Django', 'QML'] # Create a list of words
# We create QCompleter, in which we establish the list, and also the pointer to the parent
completer = QCompleter(strList, lineEdit)
lineEdit.setCompleter(completer) # Set QCompleter in the input field