로그인 바로가기 하위 메뉴 바로가기 본문 바로가기
난이도
입문

처음 배우는 프로그래밍 (w.파이썬)

임시 이미지 KAIST 김문주 교수
http://www.boostcourse.org/cs114/forum/119551
좋아요 3029 수강생 14892

 9-5

cards = []

for i in range(4):

    card = Card()

    card.value = i

cards.append(card)

 

print(cards[1].value)

 

 

 9-6

cards = []

card = Card()

for i in range(4):

    card.value = i

    cards.append(card)

 

print(cards[1].value)