Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def linsearch(list_of_text, elem):
- if elem in list_of_text: True
- def couple(list_of_text):
- while True:
- elem = input("Your word: ")
- if elem == "":
- break
- linsearch(list_of_text,elem)
- for word in range(len(list_of_text)):
- if sorted(elem) == sorted(list_of_text[word]):
- if elem != list_of_text[word]:
- print("{",elem,",", list_of_text[word],"}")
- def main():
- list_of_text = open("ordlista.txt").read().split()
- couple(list_of_text)
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement