본문 바로가기

카테고리 없음

python - 반복문

반응형

1. for




>>> for each_movie in movies:

print(each_movie)


The Holy Grail

The Life of Brian

two

The Meaning of Life

GOGO

>>> 


2. while 

>>> while count < len(movies):

print(movies[count])

count +=1


The Holy Grail

The Life of Brian

two

The Meaning of Life

GOGO

반응형