Skip to content

Instantly share code, notes, and snippets.

Created September 11, 2017 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/93fe22d771a2254bb6a685cdf7737306 to your computer and use it in GitHub Desktop.
Save anonymous/93fe22d771a2254bb6a685cdf7737306 to your computer and use it in GitHub Desktop.
------main.py------------
elif choice == "14":
marvin.points_grade()
else:
choice_low = choice.lower()
choice_list = choice_low.split()
for line in choice_list:
if not 'citat' in line:
continue
marvin.quote()
-------marvin.py-----------
def quote():
"""
citat
"""
filename = "quotes.txt"
with open(filename) as filehandle:
line = filehandle.read()
quote_split = line.split("\n")
print(quote_split[random.randint(0, len(quote)-1)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment