Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

with open

with open('songs.txt') as f,open('songs_out.txt', 'w') as f_out:
    for line in f:
        line = line.strip()
        if line.startswith("#EXTINF"):
            f_out.write(f'{line}
')
            name = line.split(",")[1]
            f_out.write(f'{name}.mp3
')
Source by python-forum.io #
 
PREVIOUS NEXT
Tagged: #open
ADD COMMENT
Topic
Name
6+6 =