본문 바로가기 메뉴 바로가기

Good Developer

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Good Developer

검색하기 폼
  • 분류 전체보기 (76)
    • hhplus (6)
    • 개발서적 (4)
    • Error (2)
    • Kafka (1)
    • React (3)
    • Docker (5)
    • Spring (6)
    • Java (27)
    • Project (3)
    • Python (16)
    • DB (3)
    • Github (0)
  • 방명록

for (1)
[Python] for

반복문 for에 대해 간략하게 알아보도록 하겠습니다. for문은 정해진 횟수만큼만 반복 수행하도록 제어하는 명령문입니다. 아래 예제를 통해 확인해보겠습니다.# i 는 변수# range(10) 0~9# 0 이상 10 미만for i in range(10): print(i + 1, end=' ')# range(start, stop, step)# start 이상 stop 미만 step 만큼 증가# 1 이상 10 미만 2만큼 증가for i in range(1, 10, 2): print(i, end=' ')# 결과: 1 3 5 7 9for i in range(1, 10, 3): print(i, end=' ')# 결과: 1 4 7list = [1, 2, 3, 4, 5, 9]for i in list: ..

Python 2022. 9. 5. 15:02
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • Lambda
  • zip
  • Lower
  • Method
  • permutations
  • Upper
  • index
  • find
  • bool
  • combinations
  • If
  • Python
  • isalpha
  • operators
  • Built-in Functions
  • isdigit
  • for
  • counter
  • function
more
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바