python - 输入一个原始字符串,例如 hello world。 输出转换后的字符串,例如 hello%20world。
迷茫
迷茫 2017-04-17 17:40:59
0
3
1341

输入一个原始字符串, hello world。 输出转换后的字符串, hello%20world。

新手 不会呀 求大神教怎么才能这样输出。。。。。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

répondre à tous(3)
左手右手慢动作

s'il est dicté sur le paramètre:

from urllib import urlencode
    data = {
         'name': 'hello world'
    }
    print urlencode(data)

s'il s'agit d'une chaîne:

from urllib import quote
    quote('hello world')
Ty80
from urllib import quote
quote(str)
Ty80

J'utilise a = raw_input()
a = a.replace(' ',' ')
imprimer un

Résolu. Je n'ai pas pu trouver de réponse car j'ai égaré l'impression. . . Merci à tous

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal