python源码大全

Python 代码库之URL字符串最后一项内容(含demo源码)

2019-08-01  本文已影响2人  iCloudEnd

Python 代码库之URL字符串最后一项内容(含demo源码)

源码

url="https://www.django.com/ai/weixin/python/reportlab.html"
templist=url.split("/")
templist[-1]

运行效果

In [14]: url="https://www.django.com/ai/weixin/python/reportlab.html" 
    ...: templist=url.split("/") 
    ...: templist[-1]                                                           
Out[14]: 'reportlab.html'

更多精彩代码请关注我的专栏

关键词

程序员 方向 云计算 前途 微信 毕设 学霸 能量

上一篇 下一篇

猜你喜欢

热点阅读