RSSAmplifier

Allison Kaptur · Oct 30, 2013

A Python puzzle

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

A couple of Hacker Schoolers were discussing an interesting corner of python today. We discovered a nice bit of trivia: there exist three lines of python code that display the following behavior: 1 2 3 4 5 6 7 8 9 10 11 12 >>> LINE_A >>> LINE_B >>> LINE_C False >>> LINE_A ; LINE_B ; LINE_C True >>> def my_function (): ... LINE_A ... LINE_B ... LINE_C >>> my_function () True What are the lines?…

Read on akaptur.github.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.