Elizabeth Weiss <cake...@gmail.com> wrote: > What is the point of this code?: > > word=[] > print(word) > > The result is [] > > When would I need to use something like this?
You often need to intialize a list, sometime with (empty) = []. Then after initializing you should do "something" that perhaps will fill the list (word.append("hello"). Then after do your job, you perhaps need to print it. But initializing and just print, will do nothing else than initialize and print the result... As state before this code more or less like : a=0 print a -- Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/> Ce message est sous licence Creative Commons "by-nc-sa-2.0" <http://creativecommons.org/licenses/by-nc-sa/2.0/fr/> -- https://mail.python.org/mailman/listinfo/python-list