-
-
Save IndhumathyChelliah/f3254195db6743cb06a67f6a8646c691 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t=('red','blue','green','red') | |
#Returns the count of 'red' in the tuple. | |
print (t.count('red')) #Output: 2 | |
t2=(1,2,3,[1,2,3],[1,2,3,4,5]) | |
print (t2.count(1))#Output: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment