> -------Original Message------- > From: Ragini Jain <[email protected]> > > Hello, > > what is the output of this simple code ? > > def f(x=[]): > x.append(1) > return x > print(f(), f()) > > > a very insightful discussion follows here > https://twitter.com/jakevdp/status/1235271748867612673 >
i know very little about Python and with the discussion followed to this article by Florimond Manca Mutable defaults https://dev.to/florimondmanca/python-mutable-defaults-are-the-source-of-all-evil-6kk warm regards Saifi.

