我们有一个具有以下值的full_path = request.full_path
/v1/helloworld?year=2020&key=123&language=in&country=ID
我们想用以下值替换langauge
GET参数值
/v1/helloworld?year=2020&key=123&language=id&country=ID
目前,我们正在使用以下方法
full_path = request.full_path
if 'in' == request.args.get('language'):
full_path = full_path.replace("language=in", "language=id")
我们对使用字符串replace
来完成这项工作不是特别舒服。我想知道,有没有其他更好的方法来实现这一目标
目前没有回答
相关问题 更多 >
编程相关推荐