len()

len() 用於統計序列的長度,字符串 、元組 、列表都屬於序列post In [1]: str = "hello world" In [2]: len(str) Out[2]: 11
相關文章
相關標籤/搜索