题目内容

字符串 str="人生苦短,我学python" print(str[-6:]+str[0:2])的输出结果是

A. n人生
B. python人生
C. pytho人生
D. python+人生

查看答案
更多问题

请阅读下面的代码,选择正确的输出结果()。 word = 'Python' print(word[0], word[5], word[-1], word[-6])

A. P n o P
B. P o o P
C. P n n P
D. P n P n

假设x,y已经赋值,下列Python语句正确的是 ()

A. min = x if x < y else y
B. max = x > y ? x : y
C. if (x > y) print x
D. while True; pass

以下是字符转换成字节的方法是()

A. decode()
B. encode()
C. upper()
D. rstrip()

以下会出现错误的是()

A. ‘北京’.encode()
B. ‘北京’.decode()
C. ‘北京’.encode().decode()
D. 以上都不会错误

答案查题题库