Python Lists, Tuples, Dictionaries, and Sets Quiz

Python Lists, Tuples, Dictionaries, and Sets Quiz

University

50 Qs

quiz-placeholder

Similar activities

data structure quizizzzs

data structure quizizzzs

University

53 Qs

Câu hỏi về thiết bị lạnh

Câu hỏi về thiết bị lạnh

University

50 Qs

Engineering for Teens — Chapter 1 Test

Engineering for Teens — Chapter 1 Test

12th Grade - University

50 Qs

QUIZ S1SK0MS4T-3AJTD2024

QUIZ S1SK0MS4T-3AJTD2024

University

50 Qs

QUIZ S1SK0MS4T-3DJTD2024

QUIZ S1SK0MS4T-3DJTD2024

University

50 Qs

Information Theory

Information Theory

University

46 Qs

Python Lists, Tuples, Dictionaries, and Sets Quiz

Python Lists, Tuples, Dictionaries, and Sets Quiz

Assessment

Quiz

Engineering

University

Medium

Created by

Vidya Bhosale

Used 1+ times

FREE Resource

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to create a list in Python?

list = {}

list = ()

list = []

list = <>

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the first element of a list my_list?

my_list[0]

my_list[1]

my_list(-1)

my_list.first()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of len([1, 2, 3, 4])?

3

4

5

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of [1, 2, 3] + [4, 5]?

[1, 2, 3, 4, 5]

[5, 7, 8]

Error

None

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does my_list[1:3] do?

Returns 1st and 3rd elements

Returns a list with elements at index 1 and 2

Returns all elements except 1 and 3

Syntax error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to add an element to a list?

add()

append()

insert()

push()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of list("abc")?

"abc"

["abc"]

['a', 'b', 'c']

{'a','b','c'}

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?