One, the path of the output Python library:
1.sys Standard Library
Import Sys
Print (Sys.path)
Results:
' E:\\python Practice \\python35 Learning \\Day2 ',
' E:\\python Practice \\python35 learning ',
' D:\\python\\lib ', ' F:\\pjproject-2.7\\tests\\pjsua ',
' C:\\users\\asus\\appdata\\local\\programs\\python\\python36\\python36.zip ',
' C:\\users\\asus\\appdata\\local\\programs\\python\\python36\\dlls ',
'c:\\users\\asus\\appdata\\local\\programs\\python\\python36\\lib ', the location of the standard library
' C:\\users\\asus\\appdata\\local\\programs\\python\\python36 ',
Location of the ' c:\\users\\asus\\appdata\\local\\programs\\python\\python36\\lib\\site-packages ' three-party library
2.os Standard Library
Import OS
#os. System ("dir") #执行命令, output to screen without saving results
Cmd_res=os.popen ("dir"). Read () #popen写入内存地址, read () reads from
Print (Cmd_res)
Os.mkdir ("Example")
Ii. Types of data
1. int integer
2. Floating-point numbers float 3.23 and 52.3E-4 (E represents the power of 10)
3. Boolean value 1 or 0
4.16 Binary representation
The character h suffix indicates that the EG:BH represents 16 binary number 11;
Represented by a 0x prefix, the eg:0x23 represents a 16 binary number of 23.
5.bytes type
In Python3, text is always Unicode, represented by the STR type, and binary data (audio, video) is represented by the bytes type.
(in Python3, the data transmission with the socket must be transmitted in binary form, so the STR type is converted to the bytes type)
Msg= "I'm learning Python3."
Print (msg)
Print (Msg.encode (encoding= ' utf-8 '))
Print (Msg.encode (' Utf-8 '). Decode (encoding= ' utf-8 '))
Results:
I'm learning Python3.
B ' \xe6\x88\x91\xe6\xad\xa3\xe5\x9c\xa8\xe5\xad\xa6\xe4\xb9\xa0python3 '
I'm learning Python3.
python3.5 Learn chapter II (1) standard library, bytes