Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import zlib
sentences = [
'Vor einem Jahr habe ich mir fuer ca. 300 Euro die Casio Exilim Kamera gekauft.',
'Ich bonerte und sturbierte, bis mein Sack leer war. MEIN SACK MEIN SACK MEIN SACK',
'SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE'
]
for s in sentences:
ratio = len(s) / len(zlib.compress(s))
if ratio <3:
print s
else:
print "(ZIP)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment