I have this error when running this code with Python:
TypeError: "NoneType" object is unsubscriptable".
Code:
number = 0
with open('playlist.txt') as read_number_lines:
for line in read_number_lines:
if line.strip():
number += 1
number = number - 1
print 'number: ', number
for i in range(number):
author_ = raw_input('author: ')
line = input('line: ')
file = open('playlist.txt','a').writelines(' - ' + author_)[line]
How do I fix it?