A bit, a relationship with bytes.
Bit: is the smallest representation unit of the computer.
Bytes: is the smallest storage unit of the computer.
1 bytes (bytes) = 8 bits (bit)
Format:
Print (bytes (' character ', encoding= ' Utf-8 ')) file read file by default
Other functions of the second strip
Strip remove the space on both sides, line breaks, tabs, and so on, you can also specify the deletion character
A= ' dsad ' Print (A.strip ()) b= ' \ndsfsadagh\t ' Print (B.strip ()) print (123) c= ' FSDFDSGF ' Print (C.strip (' F '))
Three-Print supplement
Print has a line wrapping function, but in order to not let the line break, there is also a function is end, that is, you can not change line.
Print (123) print (456) print (123,end= ") print (456)
Four letters, numbers, underlined strings are optimized for processing----------save memory
The difference between the five python2 and the Python3:1 range and Xrange:python3 in the same range as the Xrange function in Python2.
2 Division sign (/): Python2 division sign is divisible, division sign in Python3 is accurate quotient
3 Print:python2 printing does not require parentheses, while python3 requires parentheses
4 input and Raw_input:python2 are the same as the input function in Raw_input and Python3
5 code: Python2 does not support the man, Python3 is supporting the man
Six Fromkeys do value on a mutable data type, modify one value, others will be affected, and your mutable data type will not be affected by value.
Retake Course day7 (basic Supplement to Python Foundation 4)