nancieabreu6063 nancieabreu6063
  • 03-01-2020
  • Computers and Technology
contestada

When reading data across the network (i.e. from a URL) in Python 3, what string method must be used to convert it to the internal format used by strings?

Respuesta :

colocho08
colocho08 colocho08
  • 15-01-2020

Answer:

decode( )

Explanation:

We can use the method decode( ) to decode the string using the codec registered for encoding.

There are two parameters

encoding: We can encode with this parameter.

errors: If used to manage the errors.

For example:

String = "this is string example....wow!!!";

String = Str.encode('base64','strict');

If we print these variables we have:

String = b'dGhpcyBpcyBzdHJpbmcgZXhhbXBsZS4uLi53b3chISE='

String = this is string example....wow!!!

Answer Link

Otras preguntas

What kind of advantage does a country have if it can make a product more efficiently? A. an import advantage. B. an export advantage. C. a comparative advantage
i need help with this question! i'll give brainliest to the first answer
I WILL MARK BRAINLIEST
need the answer please thank you!
i found the money the money belonged to jack connet with the correct relative pronoun​
Given that f=cd3, f=450 and d =10 what is c?
what is the total surface area?
A cafe is open for six days a week. There was a mean number of 86 customers for five days. On the next day there were 122 customers. What is the mean number of
b. A car factory makes 2 red cars for every 7 white cars. If it makes 483 white cars, how many red cars did it make? HELP ME
what is a dishonoured cheque​