Untitled

SmoothestChalcedony avatar
SmoothestChalcedony
·
·
Download

Start Quiz

Study Flashcards

9 Questions

what is the output when we execute list("python")?

['p','y','t','h','o','n']

what value will be printed by the following code? my_list=list("python") print((my_list[3]))

h

what is the output of the following code? list1=['abc','zee','PYlan'] print(max(list1))

zee

what is the output of the following code? list1=['abc','zee','PYlan'] print(list1[-2][-1])

e

what is the output of the following code? list1=[23,44,56,88,90,21] print(list1[:-3])

[23,44,56]

what will be the output of the following code? a=[1,2,3,5,6] b=a.append(8) print(b)

none

what will be the output of the following code? list1=[23,90,56,88,90,44] list1.remove(90) print(list1)

[23,56,88,90,44]

what will be the output of the following code? list1=[23,49,56,88,90,44] print(list1.index(3))

valueError:3 is not in list

what will be the output of the following code? list1=[7,8,6] print(list1*2)

[7,8,6,7,8,6]

Test your understanding of Python list operations with this quiz. Questions cover topics such as list initialization, indexing, slicing, and methods like append and max.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Python Lists and List Operations
10 questions
Python Tuple and List Operations
10 questions
Python List Operations Quiz
20 questions
توانبخش لیستی ژمارەکان
15 questions
Use Quizgecko on...
Browser
Browser