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 is the formula of Sodium Sulfide? A) Na3S₂ B) NaS₂ C) Na₂S D) Nas
How would ancient astronomers from Silla have observed the movement of stars and other objects compared to astronomers today?
How do you drown a blonde?
What measurement could be the length of a pool?
why did el patron save matt’s brain in the first place
any g,,,irl can be my bestie forever​
3. Students from 4 classes at Franklin Elementary School are going on a field trip to the theater. Each class has 30 students. There will also be 6 teachers and
hi folllow me at talfishmanfanpage09
In the space provided, compare and contrast the role of production designers on a small budget production and a large budget production. Include examples in you
Governments collect taxes to