84669 人學習
152542 人學習
20005 人學習
5487 人學習
7821 人學習
359900 人學習
3350 人學習
180660 人學習
48569 人學習
18603 人學習
40936 人學習
1549 人學習
1183 人學習
32909 人學習
输入一个原始字符串, hello world。 输出转换后的字符串, hello%20world。
新手 不会呀 求大神教怎么才能这样输出。。。。。
业精于勤,荒于嬉;行成于思,毁于随。
如果是對參數的dict:
from urllib import urlencode data = { 'name': 'hello world' } print urlencode(data)
如果是字串:
from urllib import quote quote('hello world')
雷雷
我用 a = raw_input()a = a.replace(' ','%20')print a
解決了 。當時放錯了 print才沒能做出答案來。 。 。謝謝各位大神 了
如果是對參數的dict:
如果是字串:
雷雷
我用 a = raw_input()
a = a.replace(' ','%20')
print a
解決了 。當時放錯了 print才沒能做出答案來。 。 。謝謝各位大神 了