Skip to content

Instantly share code, notes, and snippets.

@cluelesscoder
Last active December 18, 2015 11:39
Show Gist options
  • Save cluelesscoder/5777013 to your computer and use it in GitHub Desktop.
Save cluelesscoder/5777013 to your computer and use it in GitHub Desktop.
import string
with open('C:\Documents and Settings\[trimmed]\Desktop\list.txt',
'rb') as infile:
fread = infile.readlines()
fread = [x.strip() for x in fread]
fread = [x.lstrip('\x95') for x in fread]
fread = [x.strip() for x in fread]
fread = [x for x in fread if x != '']
fread = [x.replace(x,'[[' + x + ']]') for x in fread]
fread = (',').join(fread)
print fread
raw_input("Press any key to continue")
@cluelesscoder
Copy link
Author

PAUL McCARTNEY
• Red Hot Chili Peppers
• Nine Inch Nails
• Phoenix

Kaskade
• Vampire Weekend
• Pretty Lights
• Yeah Yeah Yeahs

D'Angelo
• The National
• Jurassic 5
• Willie Nelson & Family

Grizzly Bear
• Daryl Hall & John Oates
• Young The Giant

Band of Horses
• A-Trak
• The Head and the Heart
• Yeasayer

Matt & Kim
• Zedd
• The Tallest Man on Earth
• Foals
• Dawes
Trombone Shorty & Orleans Avenue
• Youth Lagoon
• Gary Clark Jr.
Jessie Ware
• Dillon Francis
• Kurt Vile and The Violators
Emeli Sandé
• The Mother Hips
• Surfer Blood
• Chromatics
The Growlers
• Rudimental
• Thao & The Get Down Stay Down
Camper Van Beethoven
• Smith Westerns
• Bombino
• Wavves
Fishbone
• Milo Greene
• Atlas Genius
• Anuhea
• Twenty One Pilots
The Heavy
• Daughter
• Ivan Neville's Dumpstaphunk
• Wild Belle
King Tuff
• The Lone Bellow
• MS MR
• Little Green Cars
James McCartney
• The Soft White Sixties
• Deap Vally
• The Men
Midi Matilda
• Kopecky Family Band
• Houndmouth
• Foy Vance
Bhi Bhiman
• LoCura
• Naia Kete
• The Easy Leaves

@cluelesscoder
Copy link
Author

Error that I get is:

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-4: end of string in escape sequence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment