Created
February 22, 2018 21:14
-
-
Save Hbentzur/6121fe4b7ded4f094f00ce28a95d467e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Snakes read books, not reviews. Snakes don't give a hoot about the critics. \n", | |
"\n", | |
"Snakes don't read to find their identity.\n", | |
"\n", | |
"Snakes don't read to free themselves of guilt, to quench the thirst for rebellion, or to get rid of alienation.\n", | |
"\n", | |
"Snakes have no use for psychology.\n", | |
"\n", | |
"Snakes detest sociology.\n", | |
"\n", | |
"Snakes don't try to understand Kafka or Finnegans Wake.\n", | |
"\n", | |
"Snakes still believe in God, the family, angels, devils, witches, goblins, logic, clarity, punctuation, and other such obsolete stuff.\n", | |
"\n", | |
"Snakes love interesting stories, not commentary, guides, or footnotes.\n", | |
"\n", | |
"When a book is boring, they yawn openly, without any shame or fear of authority.\n", | |
"\n", | |
"Snakes don't expect their beloved writer to redeem humanity. Young as they are, they know that it is not in his power. Only the adults have such Snakeish illusions.\n" | |
] | |
} | |
], | |
"source": [ | |
"Singer = [line[10:].strip(\"Number \").replace (\"Children\" , \"Snakes\").replace (\"childish\" , \"Snakeish\").replace (\"They\" , \"Snakes\") for line in open(\"Singer.txt\")]\n", | |
"Singer.pop (0)\n", | |
"\n", | |
"print(\"\\n\".join(Singer))\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Singer's snake advice NO. 494:\n", | |
"Snakes have no use for psychology.\n", | |
"\n" | |
] | |
} | |
], | |
"source": [ | |
"import random\n", | |
"from random import randint\n", | |
"\n", | |
"singer_advices = 1\n", | |
"\n", | |
"for x in range(singer_advices):\n", | |
" print (\"Singer's snake advice NO. \" + (str(randint(0, 654))) + \":\")\n", | |
" print (random.choice(Singer))\n", | |
" " | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.3" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment