Wrong solution using default values for teams School class initialization (the same is in Team class)

Hi! Can someone help figure this out, I’ve solved the challenge, but was using this was of initialization:
class School:
def _ _ init _ _(self, name, teams = []):
self.teams = teams = name
and not this one:
class School:
def _ _ init _ _(self, name):
self.teams = [] = name
which is the suggested solution for it to work correctly, but when I’m using the default value there like in a first example, it gives an error in the results, and I don’t understand what’s in play here for that difference:

Thanks! :slight_smile:

Type your question above this line.


@Dmitry_Polovinkin Your solution seems to be working fine on my end. PFA a screenshot of the code and the output. It is suggested to reset the code and try again with the same initialization as yours.


hm, that’s interesting, because that difference was the only one in my code… still good to know that those 2 ways of initialization are the same, was the main thing I wanted to know :slight_smile: thanks!

1 Like