python3 使用format函数对URL进行拼接 # 完整的url url = 'https://www.aliexpress.com/item/1215121315.html' # 尝试拼接 url = 'https://www.aliexpress.com/item/-/{}.html' . format ( 1215121315 ) print ( url ) https : / / www . ali
python3 使用format函数对URL进行拼接
# 完整的urlurl = 'https://www.aliexpress.com/item/1215121315.html'
# 尝试拼接
url = 'https://www.aliexpress.com/item/-/{}.html'.format(1215121315)
print(url)
https://www.aliexpress.com/item/-/1215121315.html