# 타입선언

우리는 데이터를 처리할때 컴퓨터가 이해하거나 사람이 이해 할 수 있어야합니다. 컴퓨터가 각언어가 다르지만 컴퓨터가 이해하는 시각은 용량과 관계가 있습니다. 굳이 길게 말할필요없이 컴퓨터에 이해할 수 있도록 저장에 최소 용량만 이용한다면 훨씬 효율적으로 메모리를 사용 할 수 있을 겁니다.

## 문자형

문자형은 코딩을 하는 것에 가장 기본 적인 단위 이며 우리가 말하는 문자 그대로를 말합니다. 문자형은 문자열이라고도 하며 'String' 이라고도 표현합니다.

* 파이썬에서 문자형은 큰따옴표나 작은따옴표로 구분합니다.
* 한글자 한글자를 리스트로 모아놓은 것이 스트링 이라고 생각하면 이해 하기 쉽습니다.
  * 예를들어 "안녕하세요는" 한 글자 \['안','녕','하','세','요']의 리스트 반환형입니다.

자료형의 변수선언은 아래와 같습니다.

```python
str     = "hello"
str2    = 'hello python'
str3    = "12345 and easy coding"  
```

## 숫자형

* 숫자로 이루어진 자료타입입니다.
* 정수나 실수 등을 다룰 수 있습니다.
* 연산처리가 가능합니다. +,-,/,\* 등등

```python
int1 = 1
int2 = -2
int3 = 333
float1 = 2.0
float2 = 4.1
float3 = 3.14
```

## 불린형

**그렇다** **아니다** 를 뜻합니다.\
조건식이라는 if 문에서 자주 쓰이며 '\~할 경우','\~가 아니면' 처럼 쓰입니다.\
참과 거짓을 뜻하는 것은 우리나라 문화에 단어가 익숙치 않습니다.

아래는 코드의 예제입니다.

```python
boolean1 = True  # True
boolean2 = False  # False
boolean3 = 1 < 2  # True
boolean4 = 1 == 2  # False    
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sinbum.gitbook.io/blog/undefined-1/python/pythonuseguide/type.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
