Tuple In Python

Tuple In Python:-

It provides Immutable Object means tuple value can not be changed dynamically.

A tuple is mostly used to create Constant List in Program. tuple variable always will be declared by ().

arr = (item1,item2,item3,item4)

Tuple declare by () but access by []

Program to display element in Tuple

arr = (12,23,34,56,67,78)

for i in range(0,len(arr)):

Append, Edit and Delete operation can not be supported by tuple Object?

#del arr[0]

Post a Comment


POST Answer of Questions and ASK to Doubt

Post a Comment (0)