Mar-28-2020, 11:22 PM
im taking a coding course and im stuck on an assignment,
How would anyone get rid of those, thanks for your time!
LINKS https://drive.google.com/open?id=1RUtLX7...-AYuGhm_cq
https://drive.google.com/open?id=1Z9vmGt...Ddc2CbSsne
fname = input("Enter file name: ") fh = open(fname) lst = list() for line in fh: lst.append(line.split( '[' )) print(lst)the results give me
Output:[['But', 'soft', 'what', 'light', 'through', 'yonder', 'window', 'breaks'], ['It', 'is', 'the', 'east', 'and', 'Juliet', 'is', 'the', 'sun'], ['Arise', 'fair', 'sun', 'and', 'kill', 'the', 'envious', 'moon'], ['Who', 'is', 'already', 'sick', 'and', 'pale', 'with', 'grief']]
and i want go get rid of those 3 new lines it starts.How would anyone get rid of those, thanks for your time!
LINKS https://drive.google.com/open?id=1RUtLX7...-AYuGhm_cq
https://drive.google.com/open?id=1Z9vmGt...Ddc2CbSsne