353: Python

Explain xkcd: It's 'cause you're dumb.
(Redirected from 353)
Jump to: navigation, search
Python
I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you.
Title text: I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you.

[edit] Explanation

Python is a high-level programming language with a heavily simplified syntax.

Dynamic typing means that you do not have to declare a type for any numbers you enter (for example, "short," "float"); the Python program would automatically know how much space to assign and what type has to be used, like in Visual Basic or JavaScript.

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".

Cueball can fly because he imported the antigravity module. Python still works for Cueball in 482: Height.

Perl mentioned in the title text is another programming language, but Randall doesn't like it any more because its syntax is very complicated.

[edit] Transcript

[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.

[edit] Trivia

  • In response to this comic, the Python developers implemented the module antigravity in version 2.7+. When you import it, the default web browser will open this 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!
comment.png add a comment!

Discussion

It is necessary for both Cueballs to sample the medicine cabinet in order for this to be a hallucination. It was probably python. 122.161.29.247 (talk) (please sign your comments with ~~~~)

Or maybe there is just one Cueball - the one on the ground who is hallucinating - because he tried everything...? ;-) Kynde (talk) 20:45, 3 May 2014 (UTC)
'I also sampled everything in the medicine cabinet for comparison' is a possible reference to George's Marvellous Medicine, the children's book written by Roald Dahl, wherein a combination of medicines and household materials produces fantastical effects. Quetzalcoatl (talk) 14:31, 10 February 2014 (UTC)
Personal tools
Namespaces

Variants
Actions
Navigation
Tools

It seems you are using noscript, which is stopping our project wonderful ads from working. Explain xkcd uses ads to pay for bandwidth, and we manually approve all our advertisers, and our ads are restricted to unobtrusive images and slow animated GIFs. If you found this site helpful, please consider whitelisting us.

Want to advertise with us, or donate to us with Paypal or Bitcoin?