본문 바로가기
파이썬

파이썬 append

by Nickman 2024. 3. 19.

[영한] append 덧붙이다, 첨부하다

.append는 리스트에 값을 넣을 때 사용한다.

test2_list=[]
for i in range(10):
    test2_list.append(i)
print(test2_list)

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]