Here's a fun little project that puts that old XKCD comic to test: Repeatedly navigating to the first non-parentheses non-italics link in a wikipedia article will eventually lead you to Philosophy. It starts at a random article (but you can totally choose its starting point by changing line 64.
When I hand-tested this myself many years ago when I should've been paying attention in school, it definitely worked. Sadly, it seems to no longer be the case - although now, it seems as though all articles eventually lead to Mathematics... which I suppose also works.
Link to original comic (hover over the image to see the alt-text):
I put in Mathematics but it didn't work. Output:
Starting at Feriz Beg main.py:39: UserWarning: No parser was explicitly specified, so I'm using the best availableHTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently. The code that caused this warning is on line 39 of the file main.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor. return BeautifulSoup(''.join(result)) Navigating to /wiki/Ottoman_Empire Navigating to /wiki/Anatolia Navigating to /wiki/Asia Navigating to /wiki/Earth Navigating to /wiki/Planet Navigating to /wiki/Astronomical_body Navigating to /wiki/Physical_body Navigating to /wiki/Physics Navigating to /wiki/Natural_science Navigating to /wiki/Branches_of_science Navigating to /wiki/Science Navigating to /wiki/Knowledge Navigating to /wiki/Fact Navigating to /wiki/Reality Navigating to /wiki/Existence Navigating to /wiki/Ontology Navigating to /wiki/Philosophical Navigating to /wiki/Problem_solving Navigating to /wiki/Cognition Navigating to /wiki/Intellectual_function Navigating to /wiki/Template:TWCleanup2 Navigating to /wiki/Wikipedia:WINAD Navigating to /wiki/Dictionary Navigating to /wiki/Word Navigating to /wiki/Linguistics Navigating to /wiki/Science Stuck in a loop (we've already been to /wiki/Science), exiting.. Looks like it didn't work. Super sad. :(
That was errors included, but it "Looks like it didn't work. Super sad. :("
"Traceback (most recent call last):
File "python", line 99, in <module>"
Every time I run it. Please fix it
IndexError: list index out of range"
@nicholaschorett: It has no real, meaningful purpose. However, it is a funny reference to XKCD, a popular web comic, and it tests a rather old joke/piece of trivia. So in the grand scheme of things, there is no point, but if you're a fan of XKCD or just computer-based jokes and "tech" culture in general it may be of some relevance and/or interest.