Creating a list: - Tom Kleen

Python’s print command is used to explicitly print a line of text to the output. You can print multiple strings as one line by separating the strings with commas. Let’s change the loop to check for two specific fruits, ‘apple’ and ‘grape’, and print a generic message for all other values. for item in list: if item == “apple”: ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download