Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo:
- def __init__(self, num):
- self.l = [[0]*num]*num
- def get_list(self):
- return self.l
- def update_list(self, val):
- self.l = list(map(self._add_line, self.l, [val]*len(self.l)))
- def _add_line(self, num_list, val):
- return list(map(self._add_num, num_list, [val]*len(num_list)))
- def _add_num(self, num, val):
- return num+val
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement