Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

What are the Lists and Tuple in python?

 What are the LIST and TUPLE? What is the key difference between them?

Lists and Tuples both are the sequential data type in Python and both are used to store the different types of sequence data and Objects in Python or we can say we can store multiple types of data in a single variable.

For creating Lists using the Square Bracket notation such as ['Script Revision ', 23, 23.9, -1]. 

But While creating the Tuples using the parenthesis notation ('Script Revision ', 23, 23.9, -1).

There is one important difference between them which is most important to know and understand if you know that then you can you use them based on your needs.

Lists are mutable which means when we create the Lists we can modify them But  Tuples are Immutable which means when we create the Tuples we can not modify them.





Post a Comment

0 Comments