Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. def edit(self, code, year, value):
  2. global firstYear
  3. currentNode = self.head
  4. previous = None
  5. found = False
  6. while not found:
  7. if currentNode.data[1] == code or currentNode.data[0] == name:
  8. found = True
  9. indice = (int(year) - firstYear) + 2
  10. currentNode.data[indice] = value
  11. else:
  12. previous = currentNode
  13. currentNode = currentNode.get_next()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement