Hi! I am trying to make a program that will put the bands I've played with in alphabetical order. I'm getting the band names from a file on my computer. I am fairly new to python and don't have much experience what so ever. I'll post the code that I have so far. I feel like going in the wrong direction. If anyone could help me out that would be great.
document = file("bands.txt")
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for line in document:
print line
for alphabet in line.split():
alphabet = alphabet.lower()
alphabet = alphabet.strip(".,?!:;\"'[]{}\|@#$%^+=*-+?")
if len(alphabet) < 0:
continue
print alphabet
if alphabet not in alphabet:
alphabet[alphabet] = 0
alphabet [alphabet] =+ 1
The program prints out the first band in the document but gives me an error after that.
Thanks so much for the help.