定义字符串变量c,赋值‘hello world’,打印c中第1个字符,打印第2到第5个字符,使用count方法统计c中‘l’的个数。
c="hello world"print(c[0])print(c[1:5])print(c.count("l"))