#10-파이썬 기초 실습-출력

2020. 1. 21. 10:25AI & BigData/Python Basics

파이썬 기초 실습 - 출력

데이타 타입

* 출력 --> 컴퓨터 내부에 저장되어 있는 자료를 사람들이 볼 수 있는 형태로 변환하여 컴퓨터 외부로 내보내는 것.
* 어떤 값을 넣었을때 출력해주는 역활을 함. 숫자부터 문자열까지 모두 출력해줍니다.

In [1]:

print()

In [2]:

print('Hello world!')
Hello world!

In [3]:

print(1)
1

In [4]:

print([1,2,3,4])
[1, 2, 3, 4]

In [5]:

print(1,2,3,4)
1 2 3 4

In [6]:

print(123)
123

In [7]:

print('My name is', 'microfun')
My name is microfun

In [8]:

x = 'micro python'

In [9]:

print(x)
micro python

In [1]:

num = 77
name = '홍홍'

In [2]:

### ; , 사용
print(4+5) ; print(4-2)  # 줄을 끝을 선언하는 세미콜론;

print(4+5), print(4-2)  # 얘는 print(4+5), print(4-2), 이걸로 익식되어서 (None, None)이 출력되는 것이다.
9
2
9
2

Out[2]:

(None, None)

In [ ]: