Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- DataFrame
- matplotlib
- 최솟값
- analizer
- hierarchical_clustering
- 분류 결과표
- sklearn
- pandas
- nan
- function
- Python
- insert()
- string
- IN
- list
- 반복문
- len()
- data
- append()
- elbow method
- wcss
- numpy
- 덴드로그램
- Dictionary
- 최댓값
- count()
- Machine Learning
- del
- dendrogram
- DataAccess
Archives
- Today
- Total
개발공부
[Python] print(), input(), 형변환 본문
PRINT함수
print() - 화면에 출력하는 함수

문자열 formating
문자열 내에서 중괄호 { } 를 사용하면 뒷부분에서 변수의 순서 인덱스대로 처리가 가능하다.

INPUT 함수
input() - 유저에게 직접 입력을 받는다.



형변환
input()으로 입력받은 것은 문자열 형태이다.
그러므로 활용을 하기 위해서는 알맞는 데이터타입으로 형변환이 필요하다.
형변환 함수는 int(), float(), str()이 있다.
ex - 입력받은 문자를 정수로 형변환 후 연산하기

'Python > Basic' 카테고리의 다른 글
| [Python] String 변경, replace() (0) | 2022.04.20 |
|---|---|
| [Python]String +연산자, upper(), lower(), title(), spit() (0) | 2022.04.20 |
| [Python] String 특징, 생성, Slicing(슬라이싱) (0) | 2022.04.20 |
| [Python]Boolean (0) | 2022.04.20 |
| [Python] 변수, 데이터, 연산 (0) | 2022.04.18 |