第17842题 单选题
给定如下Python程序,运行fun("xxyyzzxyz")后,输出结果为?

有如下Python程序:

def fun(s):
    st = s[1]
    for i in range(1, len(s)):
        if len(st) == 0 or s[i] != st[len(st)-1]:
            st = st + s[i]
        else:
            st = st[0:len(st)-1]
    print(st)
fun("xxyyzzxyz")
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析