"파이썬 None"의 두 판 사이의 차이

2번째 줄: 2번째 줄:
;Python None Keyword
;Python None Keyword
;파이썬 None
;파이썬 None
* 파이썬 자료형 중 하나
* return 이 없는 함수에서 반환되는 값을 출력할 때 흔히 볼 수 있다.


<syntaxhighlight lang='python' run>
<syntaxhighlight lang='python' run>

2020년 11월 8일 (일) 00:59 판

1 개요

Python None Keyword
파이썬 None
  • 파이썬 자료형 중 하나
  • return 이 없는 함수에서 반환되는 값을 출력할 때 흔히 볼 수 있다.
print( None )
print( type(None) )
x = None
if x == None:
	print( 'x == None' )
x = None
if x is None:
	print( 'x is None' )
y = 0
if y != None:
	print( 'y != None' )
y = 0
if y is not None:
	print( 'y is not None' )
def greet():
    print("hello")
result = greet()
print('result=', result)

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}