Wednesday, September 28, 2011

Non changable list

#!/usr/bin/python
lists = ["Bala","Subramaniam","Natarajan"]
print "The lists is of type : ", type(lists)
lists[2] = "changed"
print lists
tuples = ("Bala","Subramaniam","Natarajan")
print "The tuples is of type : ", type(tuples)
tuples[2] = "changed"
print tuples

No comments:

Post a Comment