import re
s = input().split()
print(re.split('?|&',s))
它不能以这种方式工作,显示一堆难以理解的错误。
您需要按字符拆分字符串:?
或&
例如,给出了一些 URL 字符串:
https://yandex.ru/images/search?text=котики&source=images_drawing
import re
s = input().split()
print(re.split('?|&',s))
它不能以这种方式工作,显示一堆难以理解的错误。
您需要按字符拆分字符串:?
或&
例如,给出了一些 URL 字符串:
https://yandex.ru/images/search?text=котики&source=images_drawing
例子:
但最好还是使用urllib.parse: