I have a simple class Foo
given by:
class Foo:
def __init__(self, bar: list):
self.bar = bar
and an array of instances of this class foos
given by:
foos = []
foos.append(Foo(bar=[1, 2]))
foos.append(Foo(bar=[3, 4]))
foos.append(Foo(bar=[5, 6]))
I want to get an array of bars
such that:
bars = [[1, 2], [3, 4], [5, 6]]
How do I go about this please?