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판)
484
3
부
클래스와 프로토콜
for a, b in zip(self, other): ❷
if a != b: ❸
return False
return True ❹
❶ 두 객체의 길이가 다르면, 객체가 다르다.
❷
zip
()
함수는 반복형 인수의 항목으로 구성된 튜플을 생성하는 제너레이터를 만든다.
zip
()
이 생소하
다면 곧 나오는 ‘멋진
zip
()
함수’ 글상자를 참조하라. 앞에서
len
()
함수로 길이를 먼저 검사해야 한다
는 점에 주의하라.
zip
()
함수는 입력 중 하나가 소진되자마자 아무런 경고 없이 값 생성을 중단하기 때
문이다.
❸ 서로 다른 두 요소를 발견하자마자
False
를 반환하면서 빠져나간다.
❹ 여기에 도착하면 두 객체가 동일한 것이다.
TIP
zip()
함수의 이름은 지퍼 슬라이더
zipper
slider
에서 따왔다. 물리적인 지퍼 슬라이더는 지퍼 양쪽의 이빨
쌍을 맞물리게 한다.
zip(left, right)
가 하는 일을 보면 이와 비슷하다는 것을 쉽게 떠올릴 수 있다. 이
함수는 압축 파일과는 관련이 없다.
[예제
12
-
13
]은 효율이 높지만,
all(
)
함수를 사용하면
for
루프로 반복 수행하는 계산을 단
한 줄에 표현할 수 있다. 대응 요소 간의 비교가 모두
True
면, 결과도
True
다. 비교하는 도중
에 다른 요소가 나오면
(
즉 ...
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