String attribute is not modifiable1, case-related and title1Name ='Lao Cui'2 Print(Name.capitalize ())#capitalize the first letter of a string3 Print(Name.upper ())#lowercase -to-uppercase4 Print('CUI Qhaha'. Lower ())#uppercase -to-lowercase5 Print(
ASCII encoding:A computer can only handle numbers, and if you want to work with text, you must convert the text to a number before processing it. The oldest computer was designed with 8 bits (bit) as a byte (byte), so the largest integer of a word
Character encoding as we've already said, strings are also a type of data, but a special string is a coding problem. Because computers can only handle numbers, if you want to work with text, you must convert the text to a number before processing
First, built-in functions1. Mathematical Operation classABS: Calculating the absolute value of a numberDivmod: Returns the quotient and remainder of two values, which can be used to calculate the number of pages>>> Divmod (5,2) (2, 1)Max: Returns
The content of this section:
Data type
Data operations
Getting Started supplements
Reference pages
Data type numeric int (integer)On a 32-bit machine, the number of integers is 32 bits, the value range is -231~231-1, that
First, the module1. Standard libraryNo need to install, directly into the module used.Import SYS module:Import Sysprint (Sys.path) #打印环境变量绝对路径print (SYS.ARGV) #打印当前脚本相对路径Print a script The second parameter: print (SYS.ARGV [2])Import OS
One, character encodingCharacter encoding: translates human characters into numbers that a computer can recognize.Character encoding table: a table of characters that correspond to numbers.For example: ASCII, GBK, Utf-8, UnicodeUnicode----> Encode ('
The function is a class object:Class bytes ([Source[,encoding[,errors]])The return value is a byte object, and when the first argument is a string, the second argument must be supplied, and the second argument is a string of the encoded type.Bytes ()
2.7:1. Unicode unifies the language, two bytes commonly used to represent a character eg: when reading the contents of Notepad, the computer first-Convert 8 characters to Unicode to memory, and then convert Unicode to utf-when saved8 Save to file.
The server and client of Go HTTP are briefly described in the previous blog post. This article describes how to pass data in JSON format in HTTP.ServerPackage Mainimport ("Encoding/json" "FMT" "html" "Io/ioutil" "Log" "Net/http") Type CMD struct
Arguably the most significant new feature of Python 3 is a much cleaner separation between text and binary data. Text is all Unicode and is represented by the str type, and binary data are represented by thebytes ty Pe. What makes the separation
Of course, this table is what you can say when you store files11,alex li,22,13651054608,it,2013-04-01Now need to this employee information file, to achieve additions and deletions to change the operationFor fuzzy queries, the syntax supports at
The first article is about Eclipse Built in Python development environment, the second, mainly about some configuration. First article:in the Eclipse Built in Python Development EnvironmentBodyFirst we need to understand a little bit of--eclipse as
Tag: Package parameter does not require truncate type command script cannotAn introductionThe computer system is divided into three parts: the hardware, the operating system and the application.Applications that we write in Python or other languages
Soon after sitting down, the leader spoke, and in such a file found the beginning to: =?, the data wrapped in angle brackets is stored in the database. The file is as follows: to : =? UTF-8? b?5p2o5lqr5big?= [email protected]>Message-id: subject: =?
Base64 Encoding Rules:Binary number of 24bit|Divided into 4 groups, insufficient to complement \x00|Each group is encoded in 1 bytes (denoted by a character in 64 ASCII codes), a total of 4 bytes, and insufficient compensation =import base64a = base6
Original link: https://www.cnblogs.com/abclife/p/7445222.htmlPerhaps the most important new feature in Python 3 is the clearer distinction between text and binary data. Text is always encoded in Unicode, denoted by the STR type, while binary data is
Overloading, overwriting (overriding)Overloading is the representation of a class's polymorphism mainly in the method overloads, the same method name, the parameter type, how many different, the return value can be the sameoverriding (overriding) is
Today, when dealing with the crawler's analysis of cryptographic parameters, it is necessary to use the Base64 decoding. However, a typeerror:incorrect padding error occurred during the process. Here are the workarounds for review.In fact, the
Recent contact with Python coding related things, found that they do not understand the system, so through the search for information to do some summary.Character encodingStrings are also a type of data, but a special string is a coding problem.We
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.