Skip to content

encode

Category: String

Encodes the input string using the specified format

  • Return type: string
  • Parameters:
    • format string — Encoding format (‘base64’, ‘hex’, ‘url’)
'Hello'.encode('base64')
'test@example.com'.encode('url')