- Hands-On Penetration Testing with Python
- Furqan Khan
- 130字
- 2021-07-02 14:13:49
The split() method
The split method, as the name suggests, is used to split the input string over a particular delimiter and return a list that contains the words that have been split. We will be looking at lists in more detail shortly. For now, let's take a look at the following example, where we have the name, the age, and the salary of an employee in a string separated by commas. If we wish to obtain this information separately, we can perform a split over ,. The split function takes the first argument as the delimiter on which the split operation is to be performed:

By default, the split operation is performed over a space, that is, if a delimiter is not specified. This can be seen as follows:

推薦閱讀
- 深入理解Bootstrap
- MySQL數據庫應用與管理 第2版
- Rake Task Management Essentials
- Spring Cloud、Nginx高并發核心編程
- Python編程完全入門教程
- 編程數學
- VMware虛擬化技術
- Python Data Analysis Cookbook
- Hands-On GUI Programming with C++ and Qt5
- Getting Started with Python and Raspberry Pi
- OpenMP核心技術指南
- 零基礎學HTML+CSS
- QPanda量子計算編程
- Instant jQuery Boilerplate for Plugins
- Drupal 8 Development:Beginner's Guide(Second Edition)