Some Basic Python Tuple Programs-1

Some basic tuple programs

Tuple A tuple is an immutable and sequential collection of data that can be indexed and sliced. Python tuple can contain homogeneous as well as heterogeneous values of data types such as integers, floats, strings, lists, and dictionaries. Python Program to concatenate multiple tuples tup1 = (7, 1, 9) tup2 = (5, 2, 3, 4, … Read more

Dictionary and Tuple in Python – Difference in Properties

Dictionary and Tuple in Python

In this post, we will learn about tuples and dictionaries in python and how to use tuples as dictionary keys. What is tuple in python? A tuple is an ordered and immutable collection. Tuples can hold homogeneous values as well as heterogeneous values(integers, floats, strings, lists, dictionaries, etc). Tuples are sequential, thus they can be … Read more

%d bloggers like this: