Language Python
(Creative version)
| Date: | 11/06/05 |
| Author: | Schizo |
| URL: | n/a |
| Comments: | 11 |
| Info: | http://www.python.org/ |
| Score: |
'''A more interesting way to get the lyrics to "99 Bottles of Beer on the Wall", in Python.
Is this considered cheating?'''
import re, urllib
print re.sub('</p>', '', re.sub('<br>|<p>|<br/> |<br/>','\n', re.sub('No', '\nNo',
urllib.URLopener().open('http://www.99-bottles-of-beer.net/lyrics.html').read()[3516:16297])))
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| This example demonstrates the simplicity | Gerold Penz | 07/23/05 | 4 | |
| minimal version | Oliver Xymoron | 04/20/05 | 3 | |
| Advanced, extensible beer/wall framework | Jamie Turner | 05/17/06 | 3 | |
| Exception based | Michael Galpin | 02/08/08 | 0 | |
| Fully compliant version | Ricardo Garcia Gonzalez | 01/15/06 | 5 | |
| Using a iterator class | Eric Moritz | 01/20/06 | 2 | |
| using lambda in LISP style | J Adrian Zimmer | 11/14/06 | 0 | |
| New conditional expressions in 2.5 | Ezequiel Pochiero | 12/18/06 | 0 | |
| functional, w/o variables or procedures | Ivan Tkatchev | 07/14/05 | 1 | |
| minimal version with singular | Emlyn Jones | 06/13/05 | 2 |
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
I beleive this is not cheating.
OK. 10 for uber-geekness. 1 for utility. I'm kicking the tires on scripting languages right now. I've been an OO Java developer for 10 years (since 1.1.3beta) but the weakest link in my tool box is lack of a scripting language. So looking at this side-by-side with Ruby, Groovy, et al. does me no good.