Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- times = ("""1:48
- 3:52
- 3:28
- 3:38
- 3:24
- 2:50
- 2:57
- 0:44
- 4:55
- 4:18
- 4:02
- 5:11
- 3:27""")
- tracks = ("""L’introduction
- Hamburg
- All Day Long
- Affair
- Human Touch (feat. Maya Vik)
- Jørgens Lille Skit
- Imagination
- Sjølie Skit
- How Low Can You Go
- Save Us
- All Night Long
- Way It Should
- Oktober""")
- import datetime
- total = datetime.timedelta(minutes = 0,seconds = 0)
- for item in enumerate(zip(times.split("\n"),tracks.split("\n"))):
- print(str(item[0]).zfill(2)+".",item[1][1],"("+str(total)[2:]+")") # [2:] mm:ss only, delete for hh:mm:ss
- mins = datetime.timedelta(minutes = int(item[1][0].split(":")[1][0]))
- secs = datetime.timedelta(seconds = int(item[1][0].split(":")[1][1]))
- total += (mins+secs)
- """
- Output:
- 00. L’introduction (00:00)
- 01. Hamburg (04:08)
- 02. All Day Long (09:10)
- 03. Affair (11:18)
- 04. Human Touch (feat. Maya Vik) (14:26)
- 05. Jørgens Lille Skit (16:30)
- 06. Imagination (21:30)
- 07. Sjølie Skit (26:37)
- 08. How Low Can You Go (30:41)
- 09. Save Us (35:46)
- 10. All Night Long (36:54)
- 11. Way It Should (36:56)
- 12. Oktober (37:57)
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement