Understanding Lists in Python

Quiz
•
Computers
•
12th Grade
•
Easy
Vlamir Dias
Used 5+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to create a list in Python?
`list = (1, 2, 3)`
`list = [1, 2, 3]`
`list = {1, 2, 3}`
`list = <1, 2, 3>`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you access the third element in a list named `my_list`?
`my_list[2]`
`my_list[3]`
`my_list[1]`
`my_list[-1]`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following methods is used to add an element to the end of a list in Python?
`list.add()`
`list.append()`
`list.insert()`
`list.extend()`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python my_list = [1, 2, 3] my_list.append(4) print(my_list) ```
`[1, 2, 3]`
`[1, 2, 3, 4]`
`[4, 1, 2, 3]`
`[1, 2, 3, 4, 4]`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you remove the element at index 2 from a list named `my_list`?
`my_list.remove(2)`
`my_list.pop(2)`
`my_list.delete(2)`
`my_list.clear(2)`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of the following code? ```python my_list = [10, 20, 30, 40] print(my_list[1:3]) ```
`[10, 20, 30]`
`[20, 30]`
`[20, 30, 40]`
`[30, 40]`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements will create a list of numbers from 0 to 9?
`list(range(0, 10))`
`list(range(1, 10))`
`list(range(0, 9))`
`list(range(1, 9))`
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
Python List Basics

Quiz
•
12th Grade
10 questions
MASSIV

Quiz
•
12th Grade
10 questions
AP CSP - Python Lists and Arrays

Quiz
•
9th - 12th Grade
10 questions
Python Data Types and Lists ( level easy )

Quiz
•
12th Grade
10 questions
PCEP 3C: Collect and process data using tuples

Quiz
•
12th Grade
20 questions
LETS PLAY QUIZ - PYTHON CBSE CLASS XII

Quiz
•
11th - 12th Grade
15 questions
PCEP Section 3B: list methods: append(), insert(), index()

Quiz
•
12th Grade
15 questions
Python and PseudoCode Quiz

Quiz
•
10th Grade - University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
6 questions
Maier - AMDM - Unit 1 - Quiz 1 - Estimation

Quiz
•
12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade
21 questions
9th Grade English Diagnostic Quiz

Quiz
•
9th - 12th Grade
7 questions
Characteristics of Life

Interactive video
•
11th Grade - University