Percent decode URL
Your task
Percent-decode a URL-encoded string. Sequences of the form %XX (two hex digits) decode to the corresponding byte; consecutive byte escapes that form a UTF-8 multibyte sequence must decode to the correct Unicode character. Characters that are not part of an escape are passed through unchanged. Return the decoded string.
Examples
percent_decode(s: str) -> strExample 1
Input
percent_decode("hello%20world")Output
"hello world"