标签:转换 下标 discover 分数 字符 span 替换 合数 .com
a = ‘‘‘God Is A Girl Remembering me, Discover and see All over the world, She‘s known as a girl To those who a free, The mind shall be key Forgotten as the past ‘Cause history will last God is a girl, Wherever you are, Do you believe it, can you recieve it? God is a girl, Whatever you say, Do you believe it, can you recieve it? God is a girl, However you live, Do you believe it, can you recieve it? God is a girl, She‘s only a girl, Do you believe it, can you recieve it? She wants to shine, Forever in time, She is so driven, she‘s always mine Cleanly and free, She wants you to be A part of the future, A girl like me There is a sky, Illuminating us, someone is out there That we truly trust There is a rainbow for you and me A beautiful sunrise ete‘‘‘ a =a.lower() print(‘god出现次数为:‘+str(a.count(‘god‘))) for i in ‘,‘,‘?‘,‘!‘: a=a.replace(i,‘ ‘) a=a.split(‘ ‘) print(a)
grade=list(‘12312133212321‘) grade=[int(x) for x in grade] print(‘成绩表:‘,grade) grade.insert(0,2) print(‘开始增加分值为2的分数‘,grade) grade.pop(0) print(‘删除增加的分数‘,grade) print(‘输出第一个3分的同学的下标:‘,grade.index(3)) print(‘统计1分的同学人数:‘,grade.count(1)) print(‘统计3分的同学人数:‘,grade.count(3))
标签:转换 下标 discover 分数 字符 span 替换 合数 .com
原文地址:http://www.cnblogs.com/xy123ing/p/7577067.html