0

I have a list of 10.000 objects [buildings] with an attribute called"colour", for example, "red", "black", "white".

How I could change the attribute "colour" for all items in the list? For example, setting the "colour" attribute to "red" for all items in the list? Can a lambda function work for this?

solution= lambda X: X.colour ="red", buildings
Henry Ecker
  • 34,399
  • 18
  • 41
  • 57

0 Answers0