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

2024-10-03 21:26:04 发布

您现在位置:Python中文网/ 问答频道 /正文

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

":"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>

Tags: 字符串httpscom列表applicationwwwtypeposition