numbers = [1, 6, 3, 2, 5]

#리스트 맨 끝에 원소를 추가하는 것
numbers.append(7)
print(numbers)

#내가 원하는 인덱스 위치에 원소를 추가하는 것
numbers.insert(3, 4)
print(numbers)

#삭제
numbers.remove(1)
print(numbers)

#정렬
numbers.sort()
print(numbers)

fruits = ['딸기', '바나나', '블루베리', '체리']
fruits.remove('블루베리')
fruits.insert(2, '복숭아')
print(fruits)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: