O'Reilly logo

Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython by Richard Hightower

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Python Collection Types

One thing that sets Python apart from most other languages is its built-in collection types. As in the real world, in programming a collection represents more than one item. By “built-in” I mean that Python uses a special syntax for its collections, which it calls sequences. Strings are also considered sequences in Python, so all of the rules that apply to strings also apply to collections—slice notation, indexes, and so forth.

For Programmers: Hashtables, Vectors, and Collection Objects

If you use Java, you probably use hashtables and vectors in about 85 percent of the programs you write. Hashtables are similar to Python dictionaries, and vectors are similar to Python lists. The key difference is that Python's lists, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required