강의

멘토링

커뮤니티

Inflearn Community Q&A

star10092113480's profile image
star10092113480

asked

Python Basics to Practice Part 2

List-2 (Practice-1)

38분쯤 예문

Written on

·

171

0

def func_list(x):
print("x = ", x, "address = ", id(x))
x.append("하세요")
print("x = ", x, "address = ", id(x))
y= [10,20,30] #리스트형 (변경가능 객체)
print("y = ", y, "address = ", id(y))
func_list(y) # 함수 호출 (변경가능 객체)
print("y = ", y, "address = ", id(y))
 
 
이부분 보면
마지막에 강사님은
func(y)를 호출하셨는데
func_list(y)로 호출하는게 맞는거겠죠? 
python

Answer

This question is waiting for answers
Be the first to answer!
star10092113480's profile image
star10092113480

asked

Ask a question