In Python a list can be created by placing its elements in the brackets. You can modify content of a list but can't do that with tuple. A tuple can be created by using the parentheses.
Example: create a list called lst and try to modify its element.
[234, 34, 34]
Example: create a tuple called t and try to modify its element.
(23, 34, 23, 43)
>>> t=456 # error
Posted by: kumar | post date: 12-16-2012 | Subject: Python Programming Language
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: