[python] 파이썬 반복문
파이썬 반복문 기본 반복문 형태 >>> for i in (1,2,3,4,5): >>> print(i) 1 2 3 4 5 문자열 반복문 형태 >>> for s in ['hi','every','one']: >>> print(s) hi every one range 함수 >>> for i in range(0,10,2): >>> print(i) 0 2 4 6 8 >>> for i in range(1,4): >>> print(i) 1 2 3 >>> for i in range(3): >>> print(i) 0 1 2 dictionary 형태 >>> dic = {'구글':'www.google.com', '네이버':'www.naver.com', '다음':'www.daum.net'} >>> for k, v in dic.i..
2020. 12. 16.