Added __getitem__ method to TaskList