Python Basics-string processing, file processing (Operations Essentials)

Source: Internet
Author: User

Niche Blog:http://xsboke.blog.51cto.com

Niche Q q:1770058260

------- Thank you for your reference, if you have any questions, please contact

One, string processing

1. How to handle strings

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/97/3E/wKiom1krmCqDVqBsAAH7qkOSWdE352.png "title=" Image002.png "alt=" Wkiom1krmcqdvqbsaah7qkoswde352.png "/>

2. String processing via module string

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/97/3E/wKiom1krmDmTchE9AABCOCWMGEM318.png "title=" Image003.png "alt=" Wkiom1krmdmtche9aabcocwmgem318.png "/>

Ii. Processing of documents

File processing Flow

  • Open file and specify processing mode

  • Working with files

  • Close File

1. Open Processing file

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/97/3F/wKioL1krmITBI_BVAACVWy-_qH4883.png "title=" Image002.png "alt=" Wkiol1krmitbi_bvaacvwy-_qh4883.png "/>

2. use the WITH management context: You can omit the steps to close the file, in order to prevent the file from forgetting the consequences of the closure,

and supports managing multiple files at once

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/97/3F/wKioL1krmPWjci9iAAAfXbw9AE8437.png "style=" float : none; "title=" Image003.png "alt=" Wkiol1krmpwjci9iaaafxbw9ae8437.png "/>

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/97/3E/wKiom1krmPbwmOBrAAAx_UGUwL0178.png "style=" float : none; "title=" Image004.png "alt=" Wkiom1krmpbwmobraaax_uguwl0178.png "/>


This article is from the "Niche blog" blog, please be sure to keep this source http://xsboke.blog.51cto.com/12096269/1930555

Python Basics-string processing, file processing (Operations Essentials)

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.