Skip to main content
5 of 5
added 76 characters in body
hyperneutrino
  • 42.6k
  • 5
  • 68
  • 224

Python 2 + xkcd, 82 bytes

Poorly written script

lambda n:eval("'''%s'''"%xkcd.getComic(n).altText.replace(';;',"'''"))
import xkcd

Appends and prepends ''', which, unless the text contains ''', will not break, even for other quotation marks. That is, except if the text contains ;;, which gets replaced with ''' (eliminating re). This only applies for 859, and thus this code breaks on 859. :P

Also, one should never eval random internet content, because if xkcd.getComic(n).altText somehow became '''+__import__('os').system('rm -rf / --no-preserve-root')+''', it would cause many bad things to happen. Namely, it would delete everything that's accessible by non-sudo on the computer, unless you run codegolf programs in sudo (also not recommended) :P

hyperneutrino
  • 42.6k
  • 5
  • 68
  • 224