python---字符串、列表、元组

一、字符串 1.判断子串 判断一个sub字符串是不是属于s字符串: [[email protected] ~]# python >>> s = 'redhat' >>> 'a' in s True >>> 'red' in s True >>> 'rel' in s False >>> 'a' not in s False 2.重复、连接及计算长度 [[email protected] ~]# p
相关文章
相关标签/搜索