Loading

Again: What I tell you three times is true!

Let's prove that The Hunting of the Snark is Nonsense:

-----------------------------------------------------------------------------------------------------
#! /usr/bin/python
statementList = [\
"I'm very much afraid I didn't mean anything but nonsense!",
"Just the place for a Snark!",
"Just the place for a Snark!",
"6 * 7 = 42",
"I'm very much afraid I didn't mean anything but nonsense!",
"6 * 7 = 39",
"6 * 7 = 39",
"Just the place for a Snark!",
"6 * 7 = 42",
"I'm very much afraid I didn't mean anything but nonsense!",
"6 * 7 = 39",
]
for s in (s for s in frozenset(statementList) if statementList.count(s) >= 3):\
print('"' + s + '" is true!')
-----------------------------------------------------------------------------------------------------


Yuck! Ipernity doesn't allow indentation as required by Python. But the code shown above works. It yields the same results as produced by the more "pythonic" code shown in the screenshot:
-----------------------------------------------------------------------------------------------------
"I'm very much afraid I didn't mean anything but nonsense!" is true!
"6 * 7 = 39" is true!
"Just the place for a Snark!" is true!
-----------------------------------------------------------------------------------------------------

(Background image based on "Green on Green" by MJ Maccardini (trailerfullofpix)
2012-02-26, www.ipernity.com/doc/goetzkluge/30126975)
Visible by: Everyone
(more information)

More information

Visible by: Everyone

All rights reserved

Report this photo as inappropriate

1 comment

Götz Kluge said:

Haskell:
What I tell you three times is true

Lua:
TruthProof
11 years ago ( translate )