반응형
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
- Kotlin
- Google Spreadsheet
- google apps script
- gas
- Excel
- numpy
- Google Excel
- hive
- GIT
- Mac
- Java
- PANDAS
- c#
- Redshift
- string
- Tkinter
- matplotlib
- Github
- list
- PySpark
- math
- PostgreSQL
- dataframe
- django
- SQL
- Python
- Apache
- 파이썬
- array
Archives
- Today
- Total
목록RANGE (1)
달나라 노트
Python Basic : range()
range() range()는 주로 for loop와 함께 쓰이는 함수입니다.어떠한 기능을 가지는지 한번 봅시다. x = list(range(5)) print(x) print(type(x)) - Output [0, 1, 2, 3, 4] range 함수는 인자로서 숫자를 받습니다.위 예시에선 range 함수의 인자로 5라는 숫자가 주어졌습니다. 5라는 숫자를 받은 range함수는 0부터 시작하여 4(=5-1)까지 1씩 증가하는 숫자들을 인자로서 가지게되는 list를 만들어낸다고 생각하면 됩니다. for i in range(5): print(i) - Output 0 1 2 3 4 range는 어떤 숫자를 받아 list를 생성하기 때문에 위 예시처럼 for loop와 함께 사용할 수 있는 것이죠. x = li..
Python/Python Basic
2020. 12. 9. 13:27