84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
输入一个原始字符串, hello world。 输出转换后的字符串, hello%20world。
新手 不会呀 求大神教怎么才能这样输出。。。。。
业精于勤,荒于嬉;行成于思,毁于随。
If it is a dict of parameters:
from urllib import urlencode data = { 'name': 'hello world' } print urlencode(data)
If it is a string:
from urllib import quote quote('hello world')
from urllib import quote quote(str)
I use a = raw_input()a = a.replace(' ','%20')print a
Solved. I couldn't come up with an answer because I misplaced print. . . Thank you all great gods
If it is a dict of parameters:
If it is a string:
I use a = raw_input()
a = a.replace(' ','%20')
print a
Solved. I couldn't come up with an answer because I misplaced print. . . Thank you all great gods