题目内容

写出程序的运行结果。c='123'+'456'+'789'c+=c[-3:]*2print(c)

A. 789
B. 123456789
C. 123456789789
D. 123456789789789

查看答案
更多问题

设s='a,b,c',则s.split(',')的值为(),s.rsplit(',',1)的值为()。①['a','b','c']②['a,b','c']

A. ①②
B. ②①

s2=('x','y','z'),s3=':',s3.join('abc')的值为(),s3.join(s2)的值为()。

A. 'a,b,c';'x,y,z'
B. 'a:b:c';'x:y:z'

设s='abcdefg',则s[3]的值是(),s[3:5]的值是(),s[:5]的值是(),s[3:]的值是(),s[::2]的值是(),s[::-1]的值是(),s[-2:-5]的值是()。

A. 'de','d','abcde','defg','aceg','gfedcba',''
B. 'de','d','defg','abcde','aceg','gfedcba',''
C. 'de','d','defg','abcde','gfedcba','aceg',,''
D. 'd','de','abcde','defg','aceg','gfedcba',''

已知s1='redhat',print(s1.upper())的结果是(),s1.swapcase()的结果是(),s1.title()的结果是(),s1.replace('hat','cat')的结果是()。

A. REDHAT,REDHAT,'RedHat','redcat'
B. REDHAT,'RedHat','REDHAT','redcat'
C. REDHAT,'REDHAT','RedHat','redcat'
D. REDHAT,'redcat','REDHAT','RedHat'

答案查题题库