1, Ord (), Convert the character to its corresponding ASCII code
Chr () converts the ASCII code to the corresponding character
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M00/8F/2D/wKiom1jWCurAUuBIAAAJq4areFQ487.png-wh_500x0-wm_ 3-wmp_4-s_2467882137.png "title=" qq picture 20170325141450.png "alt=" wkiom1jwcurauubiaaajq4arefq487.png-wh_50 "/>
Example: Converting a string of binary numbers to an equivalent decimal number
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M00/8F/2B/wKioL1jWD2CgIA68AAAD6EtLpyo733.png-wh_500x0-wm_ 3-wmp_4-s_204915850.png "style=" float:none; "title=" qq picture 20170325143212.png "alt=" Wkiol1jwd2cgia68aaad6etlpyo733.png-wh_50 "/>
650) this.width=650; "src=" https://s2.51cto.com/wyfs02/M01/8F/2D/wKiom1jWD2GT_LpjAAAFVHYOWF8505.png-wh_500x0-wm_ 3-wmp_4-s_878898146.png "style=" float:none; "title=" qq picture 20170325143220.png "alt=" Wkiom1jwd2gt_ Lpjaaafvhyowf8505.png-wh_50 "/>
2, string modification:
The string has an immutable property that cannot be changed after it is created, and if you want to modify it, you can create a new string and assign it with the same variable name
650) this.width=650; "src=" https://s2.51cto.com/wyfs02/M02/8F/2D/wKiom1jWENewwgbiAAAPFJl6Ae8673.png-wh_500x0-wm_ 3-wmp_4-s_399973224.png "title=" qq picture 20170325144010.png "alt=" wkiom1jwenewwgbiaaapfjl6ae8673.png-wh_50 "/>
You can also use the Replace () function to Modify:
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/8F/2B/wKioL1jWEh7RKJMJAAAMMe-BW9c213.png-wh_500x0-wm_ 3-wmp_4-s_2868798155.png "title=" qq picture 20170325144536.png "alt=" wkiol1jweh7rkjmjaaamme-bw9c213.png-wh_50 "/>
This article is from "a growing small tree" blog, please be sure to keep this source http://growing2015.blog.51cto.com/12006344/1910310
Python string Learning Three