CISC 121 Chapter Notes - Chapter 10: Delimiter, Gouda Cheese

31 views3 pages
wunch and 39345 others unlocked
CISC 121 Full Course Notes
35
CISC 121 Full Course Notes
Verified Note
35 documents

Document Summary

List: a sequence of values called elements or items: lists use [ , using index to access element. Lists are mutable: aka can be changed. Traversing a list: searching through each element of a list once, use for loop. For cheese_item in cheese: print(cheese_item) gouda buratta swiss. Prints all items on a new line. Adds element to the end of a list. Filtering of the first list containing only capitalized elements. T2 is a means of getting to new t1, not saved. Adding lists does not get rid of (cid:494)middle man(cid:495) list: list. extend(list2) Adds list2 to the end of list. List2 still exists on its own: list. sort( ) T = [4, 2, 5, 3, 1] T = [1, 2, 3, 4, 5] Do not make t = t. sort( ) Typing t. sort( ) or any other method automatically: function: sorted( ) changes t. Returns new, sorted list and leaves original list alone: function: sum( )

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