【发布时间】:2022-07-20 14:31:11
【问题描述】:
URL = input("Plz enter you Url")
import os
os.system("youtube-dl -f 95 -g **URL**")
我向用户询问了 url,我想在第三行使用提供的 url
【问题讨论】:
-
你可以做类似
os.system(f"youtube-dl -f 95 -g {URL}")
标签: python
URL = input("Plz enter you Url")
import os
os.system("youtube-dl -f 95 -g **URL**")
我向用户询问了 url,我想在第三行使用提供的 url
【问题讨论】:
os.system(f"youtube-dl -f 95 -g {URL}")
标签: python
你可以在python中使用.format
所以
URL = input("Plz enter you Url")
import os
os.system("youtube-dl -f 95 -g {}".format(URL))
【讨论】:
使用字符串格式:
URL = input("Plz enter you Url")
import os
os.system(f"youtube-dl -f 95 -g {URL}")
【讨论】: