从字符串列表中的每个项目中提取一部分字符串(Python)

时间:2018-11-06 23:59:35

标签: python string list

我的字符串列表中的每个项目如下所示:

":"https://www.autoblog.com/2018/10/30/ford-f-150-hennessey-velociraptor-v8-758/"
        },
        {
            "@type":"ListItem",
            "position":2,
            "

我只是想获得这一部分并将其安排在新列表中:      https://www.autoblog.com/2018/10/30/ford-f-150-hennessey-velociraptor-v8-758/

我该怎么做?

type="application/ld+json">
    {
    "@context":"http://schema.org",
    "@type":"ItemList",
    "itemListElement":[
        {
            "@type":"ListItem",
            "position":1,
            "
 ":"https://www.autoblog.com/2018/10/31/2019-ford-mustang-bullitt-review/"
        },
        {
            "@type":"ListItem",
            "position":2,
            "
 ":"https://www.autoblog.com/2018/10/30/ford-f-150-hennessey-velociraptor-v8-758/"
        },
        {
            "@type":"ListItem",
            "position":3,
            "
 ":"https://www.autoblog.com/2018/10/30/vw-earnings-beat-expectations-waymo-ford/"
    },
    {
        "@type":"ListItem",
        "position":4,
        "
 ":"https://www.autoblog.com/2018/10/30/ford-gt-carbon-series-lightweight-336hmm9p/"
        },

        {
            "@type":"ListItem",
            "position":17,
            "
":"https://www.autoblog.com/2018/10/23/ford-ranger-bronco-michigan-assembly-plant-history/"
        }
    ]
    } 
 </script>

0 个答案:

没有答案