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판)
80
1
부
데이터 구조체
이제 언패킹을 알아보자.
2
.
5
시퀀스와 반복형 객체의 언패킹
언패킹은 시퀀스에서 항목을 추출할 때 불필요하고 에러를 유발하는 인덱스 사용을 피하게 해
주는 중요한 기능이다. 게다가 언패킹은 반복자처럼 인덱스 표기법
(
[]
)
을 지원하지 않는 반복
형 객체를 데이터 소스로 사용할 때도 잘 작동한다.
2
.
5
.
1
절 ‘별표를 이용해 불필요한 항목 걸
러내기’에서 설명하겠지만, 초과된 항목을 잡으려고 별표
(
*
)
를 사용한 경우가 아니라면, 반복
가능한 객체는 한 번에 하나의 항목만 생성하면 된다.
튜플 언패킹은
병렬 할당
parallel
assignment
을 할 때 가장 눈에 띈다. 병렬 할당이란 다음 코드에서처
럼 반복형 데이터를 변수로 구성된 튜플에 할당하는 것을 말한다.
>>>
lax_coordinates = (33.9425, -118.408056)
>>>
latitude, longitude = lax_coordinates # 언패킹
>>>
latitude
33.9425
>>>
longitude
-118.408056
언패킹하면 임시 변수를 사용하지 않고도 두 변수의 값을 맞바꿀 수 있다.
>>>
b, a = a, b
그리고 다음과 같이 함수를 호출할 때 인수 앞에 별표를 붙여서 언패킹할 수 있다.
>>>
divmod(20, 8)
(2, 4)
>>>
t = (20, ...
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