Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 10172
- DataFrame
- 그래픽
- 백준 11718
- 배열삭제
- barplot in r
- asynchronization
- react #회원가입 #비밀번호비교
- 데이터분석
- 배열추가
- R 그래프
- 그대로 출력하기
- 탈출문자
- React
- 값삭제
- 값추가
- barplot
- plot in r
- await
- 이용현황분석
- 이스케이프시퀀스
- 백준 10172
- getline
- R데이터형태
- setstate
- 버스분석
- 백준
- vetor
- useState
- 광명시버스분석
Archives
- Today
- Total
devlog_zz
[python] range() 함수 활용 - 감소하는 list 생성, 증가하는 list 생성 본문
728x90
range(start,stop,step)
start : 시작하는 값
stop : 종료 값 ( 포함 X )
step : 증감폭
감소하는 list 생성
arr = list(range(20, 0, -1))
print(arr)
[20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
증가하는 list 생성
arr = list(range(10))
print(arr)
0 부터 10-1 까지 증가하는 함수
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
728x90
'Back End > python' 카테고리의 다른 글
[ python ] list에서 for문으로 remove() 시 주의하기 - list[:] (0) | 2022.08.13 |
---|---|
[ python ] list 복사 ( copy() ) (0) | 2022.08.07 |
[python] list sort() , sorted() 차이 (0) | 2022.08.07 |
[python] list 일부 선택하기 arr[2:5] (0) | 2022.08.07 |
[python] list 최대값, 최소값 index (0) | 2022.08.07 |
Comments