잘 이해가 되지 않아 질문 드립니다 한줄씩 설명 부탁드려도 될까요? 감사합니다.
def foo(tup):
a, b = tup
return (b, a)
a = (10, 20, 30)
a, b, c = a
b, c, a = a, b, c
a, b = foo (foo((a, b)))
print(a + c)
-----
list1 = [“A”, “B”, “C”, “D”, “E”]
list1[-1] = list1[2]
list1 = list1[:4]
list1.sort()
list1.append(“AA”)
list1[list1.index(“AA”)-1] = list1[3]
print(list1)
comment