file = open("file path", "r")
links = file.read().split("\n")
print(links)
looks like this ['https://www.youtube.com/channel/UCWTgK00SCKKNgpbsAgqzUxw/videos','https://www.youtube.com/watch?v=4Dkl1K3mtHM', '']
I want it to be like this:
['https://www.youtube.com/channel/UCWTgK00SCKKNgpbsAgqzUxw/videos','https://www.youtube.com/watch?v=4Dkl1K3mtHM']
How can I achieve this? Are there any specific step i missed? How do i remove '' from the list
Original Text file: https://www.youtube.com/channel/UCWTgK00SCKKNgpbsAgqzUxw/videos https://www.youtube.com/watch?v=4Dkl1K3mtHM