from urllib import parse
# writing url is different from what you write in urlencode() way
url = 'http://www.google.com/s?wd={}'
key_word = input('Please input content you wanna search: ')

# quote() only can be used to encode string
query_string = parse.quote(key_word)
print(url.format(query_string))

598429ba9ecb055e10e4e6edbdd96ac94fbd214e
<mask token>

<mask token>
print(url.format(query_string))

<mask token>
url = 'http://www.google.com/s?wd={}'
key_word = input('Please input content you wanna search: ')
query_string = parse.quote(key_word)
print(url.format(query_string))

from urllib import parse
url = 'http://www.google.com/s?wd={}'
key_word = input('Please input content you wanna search: ')
query_string = parse.quote(key_word)
print(url.format(query_string))

from urllib import parse
# writing url is different from what you write in urlencode() way
url = 'http://www.google.com/s?wd={}'
key_word = input('Please input content you wanna search: ')

# quote() only can be used to encode string
query_string = parse.quote(key_word)
print(url.format(query_string))
