一,什么是函数?

现在有这么个情况:python中的len方法不让用了,你怎么办?

来测试一下‘hello word’ 的长度:

python----函数初识
s1 = "hello world"
length = 0
for i in s1:
    length = length+1

print(length)
python----函数初识

相关文章: