eLearning
Tutorials
Programs
Interview Questions
Technical Questions
C Language
C++
JAVA
HTML & CSS
PHP
AJAX
J2EE
SQL
jQuery
Go back to Home
Our Placements
Tutorials
Programs
Interview Questions
Technical Questions
Live Training
Our Placements
Associated Colleges
Our Recruiters
Back
C Language
C++
JAVA
HTML & CSS
PHP
AJAX
J2EE
SQL
jQuery
Programs
Home
Programs
Python
Tuple
Programs - Python -
Tuple
Program:
tuple1 = (
10
,
20
,
30
,
40
,
50
,
60
)
print(tuple1)
count =
0
for
i
in
tuple1:
print(
"tuple1[%d] = %d"
%(count, i))
count = count+
1
Output:
(10, 20, 30, 40, 50, 60)
tuple1[0] = 10
tuple1[1] = 20
tuple1[2] = 30
tuple1[3] = 40
tuple1[4] = 50
tuple1[5] = 60