a = "hello world" print(len(a))
在len函数中,字符的长度,中文与英文一样,都是算一个字符长度。
python 字符串 空字符串 len()
原文:https://www.cnblogs.com/wangzaixue/p/13650756.html