반응형
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 | 31 |
Tags
- Redshift
- Java
- Presto
- Python
- Google Spreadsheet
- numpy
- Apache
- SQL
- gas
- math
- Tkinter
- django
- Kotlin
- list
- 파이썬
- GIT
- PySpark
- Google Excel
- array
- hive
- PostgreSQL
- dataframe
- matplotlib
- PANDAS
- c#
- Github
- string
- Excel
- google apps script
Archives
- Today
- Total
목록python indentation (1)
달나라 노트
Python Basic : 코드 블록과 들여쓰기(indentation)
코드 블록과 들여쓰기(Code block and Indentation) Javascript에서는 어떤 코드들이 하나의 블록이라는 것을 알리기 위해 중괄호({})를 사용합니다. // Javascript에서의 더하기 함수 선언 예시 function sum(x, y) { return x + y } 하지만 Python에서는 들여쓰기(Indentation)를 이용하여 코드 블록을 표시합니다. # Python에서의 더하기 함수 선언 예시 def sum(x, y): return x + y Python에서의 들여쓰기는 중요한 의미를 가집니다. 만약 아래 예시에서처럼 들여쓰기를 하지 않게 되면 들여쓰기 에러(IndentationError)를 발생시킵니다. def sum(x, y): return x + y -> Inden..
Python/Python Basic
2020. 10. 29. 12:28