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
相關文章
相關標籤/搜索