D)('human', 'tiger', 'dog', 'cat')

解析:元组变量t中的元素顺序为 "cat", "dog", "tiger", "human",使用切片操作t[::-1]可以将元组倒序输出,结果为 ('human', 'tiger', 'dog', 'cat')。选项A中的大括号表示集合,选项B中的方括号表示列表,都不是元组的表示方式,因此选项A和B都不正确。

20 元组变量t=cat dog tiger human t-1的结果是Ahuman tiger dog catBhuman tiger dog catC运行出错Dhuman tiger dog cat并上解析

原文地址: https://www.cveoy.top/t/topic/hvI4 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录