Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython
by Richard Hightower
Summary
String formatting is the way we organize instructions so that Python can understand how to incorporate data in the creation of strings. How strings are formatted determines the presentation of this data. The basis of string formatting is its use of the formatting directives.
Logical operators (and, or, not) return true or false values. Comparison operators (in, not in, is, is not, ==, !=, <>, >, >=, <, <=) compare two values—is one value greater than another, or is one value not equal to another? Comparisons always return 1 for true and 0 for false.
Any value in Python equates to a Boolean true or false. A false can be equal to none, a zero of numeric type (0, 0l, 0.0), an empty sequence ('', (), []), or an empty dictionary ({}). All ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access