- the high-level data types allow you to express complex operations in a single statement;
- statement grouping is done by indentation instead of beginning and ending brackets;
- no variable or argument declarations are necessary.
이런 이유로 코드가 짧아지고 가독성이 좋아질 수 있다.
주석
#으로 시작한다
라인 앞이나 뒤에 와야댐 스트링 문자 뒤에 오면 지지
Some examples:
# this is the first comment
SPAM = 1 # and this is the second comment # ... and now a third! STRING = "# This is not a comment."
조건,반복
>>> # Fibonacci series:
... # the sum of two elements defines the next
... a, b = 0, 1
>>> while b < 10:
... print b
... a, b = b, a+b
...
1. 변수 동시선언 가능
2. 루프안은 같은 범위로 들여쓰기( tab이나 space로)
A trailing comma avoids the newline after the output
'good > Language' 카테고리의 다른 글
conneting the dots (0) | 2009.12.27 |
---|---|
< 영자 신문 읽기 7가지 공식 > (0) | 2009.12.22 |
파이썬 설치(Window XP) (0) | 2009.12.18 |
XML Simple Type, facet 적용 (0) | 2009.12.07 |
XML 스키마 include (0) | 2009.12.04 |