I have a list full of classes of the same type:
class Example():
def __init__(self, myVar):
self.myVar = myVar
# other variables and functions
# ...
Following example shows the list:
myList = []
for i in range(0,10):
myList.append(Example(i))
And now i want a quick way to get a new list with all myVar of all Example-classes. I thoght of something like:
myVector = myList[:].myVar
But this doesn't work. Can anyone help me?