파이썬 None

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 }}