命令:>>>s='up,upandaway'>>>s.count('up')的执行结果是:
查看答案
命令:s=‘Ihaveadog,Ihaveacat’re.findall(r’Ihavea(?:dog|cat)’,s)的执行结果是:
A. $contentAnswer
B. (Ihaveadog,cat)
C. (Ihaveadog,Ihaveacat)
D. [Ihaveadog,Ihaveacat]
命令print(one\ntwo\tthree)执行结果是:
A. one\ntwo\tthree
B. onetwothree
C. one(换行)two(换行)three
D. one(换行)twothree
去掉字符串s='&&&&good&&&'两边的”&“并显示出来,下面哪个命令是正确的:
A. s.lstrip('&')
B. s.rstrip('&')
C. s.astrip('&')
D. s.strip('&')
去掉字符串title='_-_-scitc_-_-'右边的”_-_-“部分,下面哪个命令是正确的:
A. title.lstrip('_-')
B. title.rstrip('_-')
C. title.strip('_-')
D. title.astrip('_-')