Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
전문가를 위한 파이썬(2판)
by
루시아누 하말류
,
강권학
November 2024
Beginner to intermediate
1064 pages
25h 21m
Korean
Hanbit Media, Inc.
Content preview from
전문가를 위한 파이썬(2판)
170
1
부
데이터 구조체
❸
bytes
리터럴은 접두사
b
로 시작한다.
❹
bytes
형인
b
는 다섯 바이트로 구성된다.
é
가
UTF
-
8
에서 두 바이트로 인코딩되기 때문이다.
❺
UTF
-
8
인코딩을 이용해
bytes
를
str
로 디코딩한다.
TIP
bytes
시퀀스는 알아보기 어려운 기계 메모리 덤프로, 유니코드
str
은 ‘사람’이 읽을 수 있는 텍스트
로 생각하면
decode
()
와
encode
()
를 쉽게 구분할 수 있다. 그러면
bytes
시퀀스를 사람이 읽을 수 있는
텍스트로 디코딩(해독)하고,
str
을 저장하거나 전송하려고
bytes
로 인코딩(암호화)한다는 말이 이해될 것
이다.
파이썬
3
의
str
은 이름만 다를 뿐, 파이썬
2
의
unicode
형과 상당히 비슷하다. 하지만 파
이썬
3
의
bytes
는 단지 이전
str
형의 이름을 변경한 것이 아니며, 이와 밀접하게 연관되는
bytearray
형도 있다. 따라서 인코딩과 디코딩 문제로 넘어가기 전에 이진 시퀀스형을 살펴볼
필요가 있다.
4
.
3
바이트 기본 지식
새로 도입된 이진 시퀀스형은 파이썬
2
의
str
과 여러모로 다르다. 우선 이진 시퀀스에 사용되
는 내장형은 두 가지가 있다. 파이썬
3
에서 소개된 불변형인
bytes
형과, 파이썬
2
.
6
에 추가된
가변형
bytearray
형이다.
4
파이썬 문서에서는
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
전문가를 위한 리액트
테자스 쿠마르
데이터로 전문가처럼 말하기
칼 올친
개발자를 위한 머신러닝&딥러닝
로런스 모로니
고성능 파이썬(2판)
오현석, 미샤 고렐릭, 이안 오스발트
Publisher Resources
ISBN: 9791169211772