4.1 初见数据处理
Python 字符串
"a b c d".split(" ") # ["a", "b", "c", "d"]" ".join(["a", "b", "c", "d"]) # "a b c d""this is good"[5:]"foo bar baz".index('bar')
"foo".index("bar") # ValueError"sub" in "string with sub"
str.startswith("prefix")
str.endswith("suffix")类型转换
容器类型的处理
数据统计
Last updated
Was this helpful?