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

Veröffentlicht am: 09 Oktober 2022
auf dem Kanal: 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)


Auf dieser Seite können Sie das Online-Video 149. Tuple Count and Index Method in Python with Example Code || Python Tuples Methods mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Bhavatavi 09 Oktober 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 11 Mal angesehen und es wurde von 0 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!