Chapter 18 - Concept Summary¶
Chapter 18 included the following concepts from computing.
Comment - A comment in Python starts with a
#and the computer will ignore everything from that character to the end of that line. Comments are used to explain your code to people.
Summary of Python Keywords and Functions¶
Close - The
closeprocedure closes a file after you are done processing it.
Find - The
findfunction is used like this
strName.find(test). It returns the index of
strNameif it is found and -1 if it is not found.
Open - The
openprocedure opens the passed file for either reading or writing.
Split - The
splitfunction returns a list of strings separated by a specified character. For example, if
message = "Nora, Jones, 15"then
['Nora', 'Jones', '15'].
This is the end of chapter 18. We would love it if you could give us some feedback on this chapter at https://www.surveymonkey.com/r/ch18-teacher-fb. You might want to open this link in a new tab to make it easier for you to return to your place in this ebook.