Skip to content

Instantly share code, notes, and snippets.

@Bengt
Created January 16, 2012 18:57
Show Gist options
  • Save Bengt/1622340 to your computer and use it in GitHub Desktop.
Save Bengt/1622340 to your computer and use it in GitHub Desktop.
SerienDeduplikator zu unserer Belustigung
Battlestar Galactica
Dexter
Die Sopranos
The Wire
Mad Men
24 - Twenty Four
The Office (GB)
Kings
Entourage
Man vs. Wild -Abenteuer Survival
Modern Family
The Daily Show
The Colbert Report
Boardwalk Empire
Spartacus: Blood and Sand
Justified
Bored to Death
Tagesthemen
The Wire
South Park
Battlestar Galactica
Dexter
The Office (GB)
The Walking Dead
Sherlock
Babylon 5
Being Erica
The Big Bang Theory
Castle
Criminal Minds
Cold Case
Dexter
Doctor Who
Leverage
Lie To Me
X-Files
Sherlock
Dr. House
Agatha Christie's Poirot
Columbo
Bones
Life
# populate watchlists
watchlists = []
for name in ['k', 'b', 'n']:
with open(name + '.list') as f and \
open(name + '.list') as f and \
open(name + '.list') as f:
watchlist = []
for series in f.readlines():
if series.endswith('\n'): series = series[:-1]
watchlist.append(series)
watchlists.append(watchlist)
# clean out watchlist
watchlist = []
for series in watchlists[0]:
if series in watchlists[0] and \
series in watchlists[1] and \
series in watchlists[2]:
watchlist.append(series)
watchlist = watchlist
print watchlist # Dexter
with open('k') as k, open('b') as b, open('n') as n:
b = b.readlines()
n = n.readlines()
for s in k.readlines():
if s in b and s in n:
print s[:-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment