“tuple en python” Réponses codées

tuple python

tuple = ("Facebook", "Instagram", "TikTok", "Twitter")
moi_crn

Tuplein Python

a=(1,2,3,4)
print(a[-3])

Coder Cat

tuple en python

name_of_students = ("Jim" , "yeasin" , "Arafat")
print(name_of_students.index('Arafat'))
YEASIN ARAFAT

Exemple de tuple Python

# Creating a Tuple with
# the use of Strings
Tuple = ('Geeks', 'For')
print("\nTuple with the use of String: ")
print(Tuple)
      
# Creating a Tuple with
# the use of list
list1 = [1, 2, 4, 5, 6]
print("\nTuple using List: ")
Tuple = tuple(list1)
  
# Accessing element using indexing
print("First element of tuple")
print(Tuple[0])
  
# Accessing element from last
# negative indexing
print("\nLast element of tuple")
print(Tuple[-1])
  
print("\nThird last element of tuple")
print(Tuple[-3])
No Name

tuple python

tupel python
Ma

tuple en python

#Tuple is immutable(which can't change)
fruits = ("Apple", "orange", "pears")
# You can check place, character in it but can't change
Ugly Unicorn

Réponses similaires à “tuple en python”

Questions similaires à “tuple en python”

Plus de réponses similaires à “tuple en python” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code