티스토리 뷰
아래 파이썬 공부는 replit.com 에서 실행하였습니다.
a = 2 # 숫자
b = 3
c = 'gozip' # 문자열은 ' ' 또는 " " 를 넣어준다.
d = True # True or False 참 거짓은 첫글자를 대문자로 써줘야 한다. (boolean)
e = 3.14 # 소수점 float
f = None # 파이썬에만 있는 타입이고 js에 null 과 유사하다.
print(a,b) # 2 3 공백이 있는 2와 3이 나온다
print(ab) # ab 는 undefined
print(a + b) # 5
print( type( e ) ) # 보이는 값 <class 'float'>
print( type( a ) ) # 보이는 값 <class 'int'>
print( type( c ) ) # 보이는 값 <class 'str'>
print( type( d ) ) # 보이는 값 <class 'bool'>
print( type( f ) ) # 보이는 값 <class 'NoneType'>
print( type( 23 ) ) # 보이는 값 <class 'int'>
'[Python]' 카테고리의 다른 글
[python] python의 형변환 (0) | 2021.07.28 |
---|---|
[python] input() 함수로 놀아보기 (0) | 2021.07.28 |
[python] 파이썬의 특징 (0) | 2021.07.28 |
[python] python_snake_case (0) | 2021.05.19 |
[python] 자바스크립트와 다른점 (0) | 2021.05.19 |
- Total
- Today
- Yesterday
- 파이썬
- 호이스팅
- Primitive Data Type
- 별칭
- PYTHON
- html5
- rdt
- java
- reserved words
- HTML
- js
- JSX
- 코딩
- 변수
- ORA-00984
- CSS
- 앞뒤 공백 제거
- 배열
- Box Model
- 28000
- ternary operator
- 박스 모델
- sql
- 바꾸는 법
- meta 속성
- ora-00907
- 907
- null
- vsCode
- javascript
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |