티스토리 뷰
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
python에서 변수명은 문자,숫자,밑줄(_)로 이루어질수 있고, 숫자가 가장처음에 나올수 없다.
따라서 a, friends, var3, _attr, is4later 등과 같은 변수명은 사용할수 있고,
2_var, hello~, hi! 등의 변수명은 사용할수 없다.
또한 python에서는 대소문자를 구분하므로 조심해야 한다.
>>> friend = 1 >>> Friend = 10 >>> friend 1 >>> Friend 10 |
아래는 예약어로서 변수명으로 사용할수 없다.
and, as, assert, break, class, continue, def, del, elif, else, except, is, finally, for, from, global, if, import, in, is, lambda, nonlocal, not, or, pass, raise, return, try, while, with, yield |
참조 : 빠르게 활용하는 파이썬3 프로그래밍
'Python' 카테고리의 다른 글
Python,module os.path [파일의 경로명] (0) | 2016.04.21 |
---|---|
Python, str 내장모듈 (0) | 2016.04.21 |
Python, 소스코드 인코딩 (0) | 2016.04.21 |
Python, if __name__=="__main__": (0) | 2016.04.21 |
Python, struct에서 사용되는c의 자료형과 python의 자료형비교 (0) | 2016.04.21 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 파이썬
- Private
- indicatoron
- IdClass
- activebackground
- borderwidth
- activeforeground
- Java
- vba
- 폼
- onetomany
- Linux
- tkinter command & bind [명령어묶기와 사건묶기] Python
- ManyToOne
- apache
- Excel
- tkinter
- 리눅스
- Python
- command
- FetchType
- Composite Key
- disabledforeground
- Module
- 상수
- checkbutton
- fetch join
- JPA
- highlightthickness
- highlightbackground
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함