Summary

In this chapter, we covered comments and document strings, which can be used to document Python code. Unlike comments, document strings can be accessed with the interactive interpreter.

We looked at Python easy-to-use built-in container types (dictionaries, tuples, and lists), the values of which are defined by literals. Literals indicate simple values of types Integer, Float, String, and Long.

Statements are instructions to Python to perform tasks. Expressions are simple statements that return a value and usually involve the use of operators. Function and class methods are made up of statements and expressions.

Get Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.