Lists in Python

Lists in Python

Assessment

Flashcard

Computers

9th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

10 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Which of these is the best description of a list in Python?

Back

A list is a collection of data that has an order.

2.

FLASHCARD QUESTION

Front

Which of these pieces of code would return the name "Harry" from the following list? nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"] Options: nameList(), nameList[1], NameList(4), nameList["4"]

Back

nameList[1]

3.

FLASHCARD QUESTION

Front

How do I remove something from a list?

Back

variable.remove()

4.

FLASHCARD QUESTION

Front

An empty list can be declared as

Back

fruitList = []

5.

FLASHCARD QUESTION

Front

Each item in a list has an "address". The first address in a Python list is what?

Back

0

6.

FLASHCARD QUESTION

Front

Which of the following is the correct way to add the number 4 to mylist? Options: mylist + 4, mylist.append(4), mylist.append([4]), 4.append(mylist)

Back

mylist.append(4)

7.

FLASHCARD QUESTION

Front

What is used to separate elements in a list?

Back

Comma

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?