Skip to content

Commit

Permalink
Basic
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjanaPurbia authored Aug 18, 2021
1 parent ae0e21b commit 347932c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tuple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#creating a tuple to store marks
marks=(92,67,89,90,92,76)
print(marks)

#iterating a tuple
for item in marks:
print(item)

#add/remove/update
#del marks[2]
#functions
print(len(marks))
print(max(marks))
print(min(marks))
t=tuple("TECHNO")
print(t)

#methods
print(marks.count(92) )
print(marks.index(90) )

0 comments on commit 347932c

Please sign in to comment.