We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce87fca commit b386e82Copy full SHA for b386e82
tuples/tuples.py
@@ -1,6 +1,6 @@
1
# Tuples :- Its a collection which is ordered, unchangeable and duplicates are allowed
2
3
-bio = ("Aakarsh", 21, "male")
+bio = ("Aakarsh", 21, "male") #A tuple is created
4
print(bio)
5
6
# Operations that can be performed on tuples is limited to 'index' and 'count' since
@@ -9,3 +9,6 @@
9
print(bio.count(21)) #Displays the count of argument in tuple 'bio'
10
print(bio.index("male")) #Displays the index of passed argument
11
12
+#looping through tuple
13
+for x in bio:
14
+ print(x,end=' ')
0 commit comments