A
A
azatbairamov2015-11-16 20:52:37
Python
azatbairamov, 2015-11-16 20:52:37

How to convert Russian characters to URL format using Python 3?

It is necessary that "fun" be converted to %D0%B2%D0%B5%D1%81%D1%91%D0%BB%D0%BE%D0%B5 (and any word in general). I tried using this code
#!/usr/bin/python
# -*- coding: utf-8 -*- from
urllib.parse import quote
name=input()
print(quote(name))
. And if you do not enter a variable, but assign it, then everything comes out correctly (name="funny")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2015-11-16
@deliro

And what, exactly, is the problem?
905f2266310a4362bfbc790c85d1ffbd.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question