第26011题 判断题
判断Python中使用加法运算符+合并字符串、列表、元组、字典的赋值语句是否都合法

在Python中,使用加法运算符 + 可以对两个字符串、列表、元组甚至是字典进行合并,即以下赋值语句都是合法的。

my_str = "ccf" + "2024"
my_list = [1, 2, 3] + [3, 4, 5]
my_tuple = (1, 2, 3) + (4,)
my_dict = {1: 'one', 2: 'two'} + {3: 'three'}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析