Assuming s1 = 'abc' and s2 = 'cba' are defined in main(), which function will return cbaabccba when result is passed to the print() function? result = string_it_up(s1, s2)单项选择题
A
def string_it_up(x, y): x += y + x return(x)
B
def string_it_up(x, y): y += x + y return(y)
C
def string_it_up(x, y): y += y + x return(y)
D
def string_it_up(x, y): x += x + y return(x)
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
类似问题
When combining text, what symbol is needed?
What does the following code print out?
What is the expected output of the following code? x = '3' y = '5' print(x + y)
The following code segment is supposed to display all of the elements in a list with dashes between them. For example, if values contains [1, 2, 3, 4, 5] then the program should display 1-2-3-4-5. result = "" for i in range(len(values) : if i > 0 : _____________________ result = result + str(values[i]) print(result) What line of code should be placed in the blank to achieve this goal?
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!