📜  python交换列表中的两个值 - Python代码示例

📅  最后修改于: 2022-03-11 14:47:05.048000             🧑  作者: Mango

代码示例1
a_list = ["a", "b", "c"]
a_list[0], a_list[2] = a_list[2], a_list[0]
print(a_list) # ["c", "b", "a"]