CISC 121 Lecture Notes - Lecture 5: Empty String, Newline, English Alphabet
CISC 121 verified notes
5/38View all
Document Summary
Arguments of type int, float, tuple, bool, and str cannot have their values changed by the workings of a function. Arguments of type list and dict, however, may have values of their elements changed by a function. Output print() function is what we typically use for output to screen in this class. It takes a variaty of parameter types and makes sense of them somehow. It can be used to see value of arguments of type int, float, str, bool, list, dict. print( hello, world!") Evidently, the function spaces the values its given out a bit, even if the programmer hasn"t bothered to do so. Default: print() completes output w newline, causing next call to the function to start output one line lower in the output window. However, the function has an optional, specialized end argument that can change the ending to anything you want a line to end with, or an empty string! print( this",end= ")