题目内容

访问字符串中的部分字符的操作称为()。

A. 分片
B. 合并
C. 索引
D. 赋值

查看答案
更多问题

下列关于字符串的描述错误的是()。

A. 字符串s的首字符是s[0]
B. 在字符串中,同一个字母的大小是等价的。
C. 字符串中的字符都是以某种二进制编码的方式进行存储和处理的
D. 字符串也能进行关系比较操作

设s="Python Programming",那么print(s[-5:])的结果是()。

A. mming
B. Python
C. Mmin
D. Pytho

下列表达式中,能用于判断字符串s1是否属于字符串s(即s1是否s的子串)的是()。 ①s1 in s;②s.find(s1)>0;③s.index(s1)>0;④s.rfind(s1);⑤s.rindex(s1)>0

A. ①
B. ①②
C. ①③
D. ②③④⑤

re.findall('to','Tom likes to play football too.',re.I)的值是()。

A. ['To', 'to', 'to']
B. ['to', 'to', 'to']
C. ['To', 'to']
D. ['to', 'to']

答案查题题库