Home > front end >  Clean vertical list
Clean vertical list

Time:08-04

So, i have a list of of Urls here and i want to print them separately.

['https://gogoanime.gg/aware-meisaku-kun-episode-222', 'https://gogoanime.gg/motto-majime-ni-fumajime-kaiketsu-zorori-3rd-season-episode-10', 'https://gogoanime.gg/yugioh-go-rush-episode-18', 'https://gogoanime.gg/tokyo-mew-mew-new-episode-5', 'https://gogoanime.gg/jashin-chan-dropkick-x-episode-5']

i want the output like this. how can get this

https://gogoanime.gg/aware-meisaku-kun-episode-222
https://gogoanime.gg/motto-majime-ni-fumajime-kaiketsu-zorori-3rd-season-episode-10
https://gogoanime.gg/yugioh-go-rush-episode-18 
https://gogoanime.gg/tokyo-mew-mew-new-episode-5
https://gogoanime.gg/jashin-chan-dropkick-x-episode-5

here's the code

from operator import index
import re
from urllib import response
from venv import create
from bs4 import BeautifulSoup
from numpy import append
import numpy as np
import pandas as pd
import requests
import json
from gogo import links

iframe_url = links
New_links = (','.join(links))
transformed_string=re.sub(",","",new_links)

CodePudding user response:

How about unpacking the list?

print(*links, sep='\n')

CodePudding user response:

Print New_links after following op:

New_links = '\n'.join(links)

CodePudding user response:

With simple for loop iterating through your list you can print

for url in links:
    print(url)
  • Related