CSC108H1 Study Guide - Final Guide: Empty String, Gnu Readline, Net.

469 views42 pages
28 Feb 2018
School
Course
yifanyang and 39659 others unlocked
CSC108H1 Full Course Notes
21
CSC108H1 Full Course Notes
Verified Note
21 documents

Document Summary

Lists can contain items of any types, including other lists. Nested list- list containing other lists as items. Address- list of items in which each item in itself is a list. Each item itself is a 2 element list. 2 is the length of each item or inner list . It is finding the length of the list at index 0 of grades. Since each item of the list is a list, it can also be indexed. The value at index 0 of the inner inner list, which is located at index 0 of the outer list. The value of index 1 of the inner list, which is located at index 1 of the outer list. Ex: write a function that can calculate the average of grades for all the assignments. Which of the following expressions evaluate to 3: data[2] or len(data[2], data[1] or data[1][0, sublist[0] or len(sublist[0], data[2][0] or len(data[2][0])