Which of the following is the correct way to create a list in Python?

List quiz1

Quiz
•
Computers
•
9th - 12th Grade
•
Easy
kidzian pvtltd
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
list = "apple", "banana", "cherry"
list = {"apple", "banana", "cherry"}
list = ["apple", "banana", "cherry"]
list = (apple, banana, cherry)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in a list?
0
1
2
none
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the last item of a list named fruits?
fruits[-1]
fruits[len(fruits)]
fruits[0]
fruits[last]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of len([10, 20, 30])?
2
3
4
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to add an item to the end of a list?
insert()
add()
append()
push()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will list1 = [1, 2] * 3 result in?
[1, 2, 1, 2, 1, 2]
[1, 2, 3]
[3, 6]
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following removes the first matching value in a list?
pop()
remove()
del()
discard()
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Python Lists

Quiz
•
10th - 12th Grade
12 questions
Python list starter

Quiz
•
10th Grade - University
15 questions
Strategi Algoritmik dan Pemrograman - Informatika XI

Quiz
•
11th Grade
10 questions
Python List Quiz

Quiz
•
11th Grade
11 questions
Javascript Lists Lecture Knowledge Check

Quiz
•
9th - 12th Grade
15 questions
Kuis Python 1

Quiz
•
11th Grade
10 questions
MASSIV

Quiz
•
12th Grade
14 questions
Python List Basics

Quiz
•
12th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade
Discover more resources for Computers
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade