Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def edit(self, code, year, value):
- global firstYear
- currentNode = self.head
- previous = None
- found = False
- while not found:
- if currentNode.data[1] == code or currentNode.data[0] == name:
- found = True
- indice = (int(year) - firstYear) + 2
- currentNode.data[indice] = value
- else:
- previous = currentNode
- currentNode = currentNode.get_next()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement