Python encoding problem

Python3, all strings are unicodestored in memory.

t = 'abc'

The execution order of the above statements in the computer memory is as follows:

  • Create a string in memory'abc'
  • Create a variable in the program stack registert
  • Make the variable in the register tpoint to (that is, assign the address 'abc'of the string to )'abc't

The execution order of string variables inside the computer

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325234580&siteId=291194637