“Jak iterować krotność w Python” Kod odpowiedzi

Jak iterować krotność w Python

#Loop Through the Index Numbers

#You can also loop through the tuple items by referring to their index number.

#Use the range() and len() functions to create a suitable iterable.

#Print all items by referring to their index number:

thistuple = ("apple", "banana", "cherry")
for i in range(len(thistuple)):
  print(thistuple[i])
Asif Iqbal Paracha

Python pętla do krotki

t=(1,2,3)
for i in t:
  print i
Hilarious Hoopoe

Iteracyjne krotki w Pythonie

thistuple = ("apple", "banana", "cherry")
for x in thistuple:
  print(x)
Programmer of empires

Odpowiedzi podobne do “Jak iterować krotność w Python”

Pytania podobne do “Jak iterować krotność w Python”

Więcej pokrewnych odpowiedzi na “Jak iterować krotność w Python” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu