COMPSCI 61A Chapter Notes - Chapter 2.3: List Comprehension, Berkeley, California, String Literal

25 views3 pages
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents

Document Summary

7:58 pm sequence - an ordered collection of values; a data structure consisting of an indexed collection of values. A sequence can be finite (with a certain length) or infinite. Sequences can be mutable (elements can change) or immutable (elements cannot change) Types of sequences tuples (immutable) lists (mutable) ranges. Tuples tuple - immutable sequences (, , , ,) Lists list - a list value is a mutable sequence that can have arbitrary length. Multiplying a list with an integer replicates the sequence that integer number of times. Adds an element onto a mutable sequence from the end (it does not create a new list (a copy of the list)) 4 gets added onto the end of the object a points to, a and. b still point to the same object extend. Adds a list onto the end of a mutable sequence (it does not create a new list (a copy of the list))

Get access

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

Related Documents