a = [1,2,3]
b = a[:]
a[1] = 4
print(a)
print(b)
**when i run this code(run python files in terminal, run selection file in terminal), i can see the two different message in terminal One is
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 "/Users/moontaeyeong/OneDrive/python/day 3.py" File "", line 1 /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 "/Users/moontaeyeong/OneDrive/python/day 3.py" ^ SyntaxError: invalid syntax <<< and second thing is
printed correct value like this a = [1,2,3] b = a[:] a[1] = 4 print(a) [1, 4, 3] print(b) [1, 2, 3]** <<<< so.. i got a two question. first. what's the defferece between "run python files in terminal" and "selection python file in terminal" second, when i run the selection file(whole lines), why return like that? i can't understand the reason why return the whole things. (what i pointed as(>>>)) a = [1,2,3] b = a[:] a[1] = 4 print(a) [1, 4, 3] print(b) [1, 2, 3] P.S. i'm not good at ENG, but i have to use this community because i heared community as the best way for strong developer, plz give me a hand bro :D**