1010 Study Guide - Quiz Guide: Standard Streams, Iterator, List Comprehension

203 views2 pages
School
Department
Course
Professor

Document Summary

Latest version on : https://perso. limsi. fr/pointal/python:memento integer, loat, boolean, string, bytes. Ordered sequences, fast index access, repeatable values int float bool str. Expression with only comas tuple str bytes (ordered sequences of chars / bytes) Key containers, no a priori order, fast key access, each key is unique dict dictionary (key/value associations) set. Identiiers for variables, functions, modules, classes names a za z_ followed by a za z_0 9. Assignment binding of a name with a value: evaluation of right side expression value, assignment in order with left side names x=1. 2+8+sin(y) a=b=c=0 assignment to same value y,z,r=9. 2,-7. 6,0 a,b=b,a values swap a,*b=seq. *a,b=seq x+=3 x-=2 x=none undeined constant value del x remove name x increment x=x+3 decrement x=x-2 unpacking of sequence in item and list and multiple assignments type(expression) ":". join(["toto","12","pswd"]) "toto:12:pswd" str splitted on whitespaces list of str. "words with spaces". split() ["words","with","spaces"] str splitted on separator str list of str.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers