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

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'

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

  • reportlab教程和源码大全

  • python源码大全

  • Sqlite教程和SQL语句请关注我的专栏

关键词

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

你可能感兴趣的:(Python 代码库之URL字符串最后一项内容(含demo源码))