
Page in question: http://docs.python.org/py3k/tutorial/datastructures.html#sets
fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
fruit = set(basket) # create a set without duplicates
Should be
fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
fruit = set(*fruit*) # create a set without duplicates
as the intention is to show how to create a set without duplicates from a list. -- Денис Горбачев, Начальник отдела Web-разработок ЗАО <<ТруОфис>> http://www.trueoffice.ru/ +7 929 619-35-88

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 13.05.2010 14:14, schrieb Денис Горбачев:
Page in question: http://docs.python.org/py3k/tutorial/datastructures.html#sets
fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
fruit = set(basket) # create a set without duplicates
Should be
fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
fruit = set(*fruit*) # create a set without duplicates
as the intention is to show how to create a set without duplicates from a list.
Dear Denis, Thanks for the report, that example should now be clearer. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) iEYEARECAAYFAkv28OAACgkQN9GcIYhpnLCMqgCdGaNrMuOKhKsF4gLGLyg+0gCA J+kAoInYQAj7daNFzDdYlmIqVuI8sHfp =4PK+ -----END PGP SIGNATURE-----
participants (2)
-
Georg Brandl
-
Денис Горбачев