Python Programming - Python Tuple | Problem Solving and Python Programming : Data, Expressions, Statements

Chapter: Problem Solving and Python Programming : Data, Expressions, Statements

Python Tuple

Tuple is an ordered sequence of items same as list.

Python Tuple

Tuple is an ordered sequence of items same as list. The only difference is that tuples are immutable. Tuples once created cannot be modified.

Tuples are used to write-protect data and are usually faster than list as it cannot change dynamically.

It is defined within parentheses () where items are separated by commas.

Eg:

>>>        t = (5,'program', 1+3j)

>>>a=(5,7.9,10)

 

Tags : Python Programming , Problem Solving and Python Programming : Data, Expressions, Statements
Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Problem Solving and Python Programming : Data, Expressions, Statements : Python Tuple | Python Programming

Related Topics

Problem Solving and Python Programming : Data, Expressions, Statements


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.