Skip to Content
Perl To Python Migration
book

Perl To Python Migration

by Martin C. Brown
November 2001
Beginner
320 pages
5h 53m
English
Pearson Business
Content preview from Perl To Python Migration

PYTHON OPERATORS

Python supports a very similar set of operators to those supported by Perl. The major difference is that operators in Python tend to be consistent across all the different object types. We've already seen examples of this with the + and * operators. The other place where this has an effect are the comparison operators – Python uses only one set of operators which can be used for comparing numbers and strings, Perl uses different operator sets.

Also, the different parentheses and braces are used to define the object type, rather than being used to access information from different objects. For example, the [] brackets are used to create a list, and also to extract the information from any sequence type and dictionaries.

The operators ...

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.
Start your free trial

You might also like

Perl in a Nutshell

Perl in a Nutshell

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Perl by Example

Perl by Example

Ellie Quigley
Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe

Publisher Resources

ISBN: 0201734885Purchase book