Xah's {Python, Perl, Ruby} Tutorial

🐍🐫💎
, , …,

This is a tutorial on Perl, Python, and few other dynamic languages. The tutorial is concrete, example based, covering a practical subset of the language, using universal language features. The goal is to get you quickly started. You can start coding toy programs after a few hours. Then, you'll be able to understand & use official language reference for detail & advanced features.

New languages and snippets are added continuously. For latest news and additions, subscribe at Xah Programing Blog.

buy this tutorial for $15. Use the paypal button below. In the comment field, put “python tutorial”. I'll email you the download link. Make sure your email address is included and correct.

there is a Python, pithy
mighty, lissome, and tabby
algorithms it puffs
conundrums it snuffs
and cherished by those savvy
there is a camel, kooky
ugly, loathsome, ungainly
hacking it supports
TIMTOWTDI it sports
and transports DWIM-wit's fancy
there is a gem called Ruby
shiny and pretty
objectively beautiful
functionally magical
make Rails of web happy

Language in a Glance

Topic Python Perl Ruby PHP JavaScript Emacs Lisp
Language in a Glance Python Perl Ruby PHP JavaScript Emacs Lisp
Print Version Python Perl Ruby
doc lookup Python Perl Ruby

Note: for JavaScript and emacs lisp, they have dedicated pages. See: JavaScript TutorialEmacs Lisp Tutorial.

Language Basics by Topic

Topic Python Perl Ruby PHP JavaScript Emacs Lisp
Quoting String Python Perl Ruby
String Operations Python Perl Ruby
True & False Python Perl Ruby
if then else Python Perl Ruby
for, while, loop Python Perl Ruby
List Python Perl Ruby
Key/Value List Python Perl Ruby
Unicode Python Perl Ruby
Loop Thru List Python Perl Ruby
Map ƒ to List Python Perl Ruby
Formatting String Python Perl Ruby
Regex Python Perl
Using Module Python Perl
Function Python Perl Ruby
Writing Module Python Perl

Common tasks.

Topic Python Perl Ruby PHP JavaScript Emacs Lisp
Sort Python Perl
List Comprehension Python Perl
Reading & Writing File Python Perl
Traverse Directory Python Perl
path manipulation Python
Complex Numbers Python Perl Ruby
Environment Variable Python Perl
JSON Python

Python Regex Reference

Python Regex Tutorial & Reference

Python: {String, Array, Dictionary} Methods

Advanced, Specific, Tasks

Find/Replace

Unicode

Internet

HTML/Web

Unix Sys Admin

Topic Python Perl Ruby PHP JavaScript Emacs Lisp
System Call Python Perl
gzip file Python Perl

Functional Programing Exercises

Python Documentation Problems

Python Documentation Problems

Python Criticism

misc, unsorted

Topic Python Perl Ruby PHP JavaScript Emacs Lisp
Split Line by Regex Python Perl

About The Author. Thanks to members of comp.lang.perl.misc and comp.lang.python for comments and corrections.

Python doc mirror:

blog comments powered by Disqus