I'm developing a dictionary kind of application using python. In my code, there is a list which consists of sorted set of strings. when a user give some text, I want to get all the string starting with the given string. In other words, I just want to suggest words while user is typing.
Example : If user typed the word "sub", I want to take all the string from the list starting with the substring "sub".
Can anyone give me an algorithm to do this? Thanks all.