a = [] 
a.append(1) #리스트이름.append(추가할 내용)
a.append(2)
a.append(3)
print(a)

#거북이 -> 홍학 -> 토끼
list = []
list.append('거북이')
list.append('홍학')
list.append('토끼')
print(list)
list.insert(1, '도도새')
print(list)
list.remove('도도새')
print(list)
list.sort()
print(list)

b = [10, 45, 55, 60]
b.insert(2, 50)
print(b)

c = [3, 2, 1, 3]
c.remove(3)
print(c)

d = [4, 6, 2, 9, 0, 1]
d.sort()
print(d)

e = ['carrot', 'banana', 'apple']
e.sort()
print(e)

up = []
down = []
f = int(input())
if f < 50:
    down.append(f)
else:
    up.append(f)
print('down:', down)
print('up:', up)
    







Embed on website

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