“Indeks Daftar Python ()” Kode Jawaban

Indeks Daftar Python ()

Python Program to Find the index of element in the list
# Programming list
programming_list = ['C','C#','Python','Java','JavaScript','SQL']

# find the index of Python
index = programming_list.index('Python')
print('The index of Python is :', index)

# find the index of SQL
index = programming_list.index('SQL')
print('The index of SQL is :', index)
Gorgeous Gazelle

Indeks Daftar Python ()

ValueError: 'item' is not in list
# Programming list
programming_list = ['C','C#','Python','Java','JavaScript','SQL','Java','F#','Go']

# find the lowest index of HTML
index = programming_list.index('HTML')
print('The index of HTML is :', index)
Gorgeous Gazelle

Jawaban yang mirip dengan “Indeks Daftar Python ()”

Pertanyaan yang mirip dengan “Indeks Daftar Python ()”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya