149. Tuple Count and Index Method in Python with Example Code || Python Tuples Methods

Published: 09 October 2022
on channel: Bhavatavi
11
0

Code:
vowels=('a','e','i','o','u')
count=vowels.count('i')
print(count)
count=vowels.count('p')
print(count)


random=('a',('a','b'),('a','b'),[3,4])
count=random.count(('a','b'))
print(count)
count=random.count([3,4])
print(count)

#index

vowels=('a','e','i','o','u')
index=vowels.index('e')
print(index)
index=vowels.index('i')
print(index)
index=vowels.index('a')
print(index)
alphabet=('a','e','i','o','u','g','h','j','l')
index=alphabet.index('g')
print(index)

index=alphabet.index('i',2)
print(index)

index=alphabet.index('g',2,6)
print(index)


On this page of the site you can watch the video online 149. Tuple Count and Index Method in Python with Example Code || Python Tuples Methods with a duration of hours minute second in good quality, which was uploaded by the user Bhavatavi 09 October 2022, share the link with friends and acquaintances, this video has already been watched 11 times on youtube and it was liked by 0 viewers. Enjoy your viewing!