Declaring column = 0, and then use it in just one place seems unnecessary to me, you could use just self.item(i, 0), and avoid this declaration