URLify a given string Python
PROGRAM TO URLify A GIVEN STRING
OUTPUT
Mr%20John%20Smith
# Instantiate the strings = "Mr John Smith "# Trim the given strings = s.strip()# Replace All space (unicode is \\s) to %20s = s.replace(' ', "%20")# Display the resultprint(s)
Mr%20John%20Smith
Comments
Post a Comment