본문 바로가기

Python

Python 변수 타입

a_string = "this is string" (string type)

a_number = 2 (int type)

a_float = 1.23 (float type)

a_boolean = True (boolean type) : 다른 언어와 달리 앞 단어를 대문자로 써야한다. False

a_none = None (none type) : 다른 언어의 null type 과 같다.

 

지금까지는 camel case 를 썼지만 파이썬에서는 대부분 snake case 를 쓴다.

a_string 같이 _ 를 붙여서 단어 사이를 띄운다 (snake case)

 

https://docs.python.org/

 

3.8.0 Documentation

Python 3.8.0 documentation Welcome! This is the documentation for Python 3.8.0. Parts of the documentation: What's new in Python 3.8? or all "What's new" documents since 2.0 Tutorial start here Library Reference keep this under your pillow Language Referen

docs.python.org

 

'Python' 카테고리의 다른 글

Python [function] argugment use  (0) 2019.11.24
Python function def , use  (0) 2019.11.24
Python Dictionary type (javascript obj 같은 것)  (0) 2019.11.24
Python tuple [Sequence Type]  (0) 2019.11.23
Python list [Sequence type]  (0) 2019.11.23