0
我有一个字符串如何从一个特定的字符串获取子的一部分在python
str = <iframe width="420" height="315" src="https://www.youtube-nocookie.com/embed/jc8zayasOB8" frameborder="0" allowfullscreen></iframe>
,我想借此在子SRC - 即“https://www.youtube-nocookie.com/embed/jc8zayasOB8”。那么我们如何才能做到这一点。 我试过这个
my_string="hello python world , i'm a beginner "
print my_string.split("world",1)[1] .
但它给了世界之后的所有字符串。我只想要src里面的子字符串。
非常感谢亲爱的朋友 – manuthalasseril