#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목반환 출력2022-03-21 10:14
작성자

1. def  say() : return 'hello'

여기서 return을 통해 반환하라는 걸 알 수 있는 건가요?

2. 그리고 왜 굳이 

def say() : return 'hello'

word=say()

print(word)

이런식으로 써서 hello라는 값을 도출하는 건가요? 주피터노트북에서 def say() : return 'hello'라는 식만 쓰고 say()만 써도 hello가 도출되는데.. 이유가 궁금합니다

3. 반환과 출력의 차이를 알려주세요

댓글
이전[re]print2022-03-21
다음[re]반환 출력2022-03-21