CSC108H1 Quiz: Study Guide - Practice Quiz 04 - Lists

46 views2 pages
6 Jun 2018
School
Course
Professor
Practice Quiz 04: Lists
1. Print the output of the following code.
my_list = [1, 2, 3, 4]
print(my_list)
my_list[1] = 3
print(my_list)
2. Print the output of the following code.
my_list = ['a', 'b', 'c', 'd']
print(my_list)
my_list[1] = ['e', 'f']
print(my_list)
3. Print the output of the following code.
my_list = [[1, 2], [['#', 4, [5, 6], 7], 'dogs', [[[True, False]]], 1], 8]
print(len(my_list))
print(my_list[1][1])
print(my_list[1][2][0])
4. Print the output of the following code.
my_list = [1, 1]
print(my_list)
my_list[0] = my_list[:]
my_list[1] = my_list[:]
print(my_list)
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in
yifanyang and 39659 others unlocked
CSC108H1 Full Course Notes
21
CSC108H1 Full Course Notes
Verified Note
21 documents

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers