python split函数
来源:互联网 发布:apple care mac 怎么买 编辑:程序博客网 时间:2024/06/08 02:31
#encoding=utf-8import restr='2016:9:22'l_str=re.split(':',str)print(len(l_str))for item in l_str: print(item)str=':2016:9:22'l_str=re.split(':',str)print(len(l_str))for item in l_str: if item: print(item) else: print('null')
注意:即便split分隔符前边没有数据,在返回的list中也会有一个空值。
0 0
- split函数 python
- python strip() split()函数
- python中的split函数
- Python之Split函数
- python split()函数详解
- Python中的split()函数
- python strip() split()函数
- python split函数
- python strip() split()函数
- python split() 函数
- python split函数
- python字符串split函数
- Python之Split函数
- Python split函数
- Python split() 函数
- python str.split和numpy.split函数
- split函数 (二) python
- 【Python】 strip(),split()函数介绍
- Jquery之事件绑定(bind)实现加减乘除运算
- 设计模式6大设计原则
- hadoop集群上传60G文件传输到20多G失去传输连接
- 解决 Successfully created project '' on GitHub, but initial push failed: Could not read from remote
- 交叉编译器安装步骤
- python split函数
- 51 nod 1195 斐波那契数列的循环节
- android底层库libutils之thread研究
- 盒模型及margin padding
- 全局/静态变量初始化为0出错? 全局/静态变量初始化为0放在bss段还是data段?
- 3324顺序表应用1:多余元素删除之移位算法
- kali 安装中文输入法
- 401.leetcode Binary Watch(easy)[递归回溯]
- Python爬虫实例三