Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def make_ll(self):
- linked_list = ll.LinkedList()
- print(linked_list)
- for word in self.init_list:
- if len(word) == int(self.word_length):
- linked_list.append(str(word))
- self.linked_list = linked_list
- def init_family(self, guess):
- self.dictionary = {}
- cursor = self.linked_list.head
- while cursor != None:
- word = cursor.data
- cursor = cursor.next
- word = self.make_families(word, guess)
- def make_families(self, word, guess):
- count = 0
- new_word = ""
- for c in word:
- if guess == c:
- count += 1
- else:
- new_word = word.replace(c, "-")
- print(new_word)
- if count == 0:
- self.linked_list.delete(word)
- return word
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement