def get_rows(self):
        '''returns rows with items
        [[item1 item2], [item3 item4], [item5]]'''
        rows = []
        row = []
        for i, item in enumerate(self.items):
            if i > 0 and i % self.objects_per_row == 0:
                rows.append(row)
                row = []
            row.append(item)
        rows.append(row)
        return rows
def get_rows ( self ) : rows = [ ] row = [ ] for i , item in enumerate ( self . items ) : if i > 0 and i % self . objects_per_row == 0 : rows . append ( row ) row = [ ] row . append ( item ) rows . append ( row ) return rows
returns rows with items
        [[item1 item2], [item3 item4], [item5]]