Title text: I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you.
Python is a high-level programming language with a heavily simplified syntax.
Whitespaces are invisible text characters, like a space or a tab. In Python you delimit blocks simply by indenting the code, while many other programming languages require brackets or statements like BEGIN...END.
Methods, functions and constants in Python are packed in modules. To use a module, you just have to put this code on top of your source file: "
import module". There are lots of ready-to-use modules available, packed into more than 25,000 "packages".
- [A Friend is talking to Cueball, who is floating in the sky.]
- Friend: You're flying! How?
- Cueball: Python!
- Cueball: I learned it last night! Everything is so simple!
- Cueball: Hello world is just 'print "Hello, World!"'
- Friend: I dunno... Dynamic typing? Whitespace?
- Cueball: Come join us! Programming is fun again! It's a whole new world up here!
- Friend: But how are you flying?
- Cueball: I just typed 'import antigravity'
- Friend: That's it?
- Cueball: ...I also sampled everything in the medicine cabinet for comparison.
- Cueball: But I think this is the python.
- In response to this comic, the Python developers implemented the module
antigravityin version 2.7+. When you
importit, the default web browser will open the comic. Also, in version 3+, the module contains a geohashing function.
- As Perl could also be the name of a girl the title text of leaving Perl has double meaning. Also, being with the other program was wonderful. He has not only been unfaithful he is actually leaving!