'''
for문 기본형 - 시퀀스의 길이만큼 반복된다
for 변수 in 시퀀스:
    반복할 명령
'''
for i in [1, 2, 3]:
    print('*')

for i in 'abcd':
    print(i)

sum = 0
for i in [3, 6, 9]:
    sum = sum + i
    print(sum)

print('----문제1----')
menu = ['김밥', '라면', '떡볶이', '돈가스']

for item in menu:
    print(item)

print('----문제2----')
total = 0
for i in [1,2,3,4,5,6,7,8,9,10]:
    total = total + i
print(total)

Embed on website

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