Skip to Content
밑바닥부터 시작하는 데이터 과학 데이터 분석을 위한 파이썬 프로그래밍과 수학·통계 기초
book

밑바닥부터 시작하는 데이터 과학 데이터 분석을 위한 파이썬 프로그래밍과 수학·통계 기초

by Joel Grus, Hangyeol Kim, Seongju Ha, Eunjung Park
May 2022
Beginner to intermediate
448 pages
13h 7m
Korean
Insight
Content preview from 밑바닥부터 시작하는 데이터 과학 데이터 분석을 위한 파이썬 프로그래밍과 수학·통계 기초
from Scratch
43
󽴜󽴔󼖏󻱔󽴔󻪃󺙇󼘛󻱃󻘧
def other
_
way
_
magic(x, y, z):
return x + y + z
x
_
y
_
list = [1, 2]
z
_
dict = {"z": 3}
assert other
_
way
_
magic(*x
_
y
_
list, **z
_
dict) == 6, "1 + 2 + 3 should be 6"
args
kwargs
를 사용하면 온갖 희한한 것을 할 수 있다. 하지만 앞으로 임의
의 인자를 입력 받을 수 있는 고차 함수를 만들 때만
args
kwargs
를 사용할 것
이다.
def doubler
_
correct(f):
"""f
인자에
상관없이
작동한다
."""
def g(*args, **kwargs):
"""g
인자가
무엇이든
간에
f
보내준다
."""
return 2 * f(*args, **kwargs)
return g
g = doubler
_
correct(f2)
assert g(1, 2) == 6, "doubler should work now"
코드의 가독성을 위해 함수에서 필요한 인자는 모두 명시하는 것을 추천한다.
이 책에서는 꼭 필요할 때만
args
kwargs
를 사용할 것이다.
2.26
타입 어노테이션
파이썬은 동적 타입(
dynamically
typed
) 언어다. 이는 변수를 올바르게만 사용
한다면 변수의 타입은 신경 쓰지 ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

안드로이드 멀티스레딩: 비동기 메커니즘으로 날렵하고 안정적인 앱 만들기

안드로이드 멀티스레딩: 비동기 메커니즘으로 날렵하고 안정적인 앱 만들기

한대희, 안데르스 예란손

Publisher Resources

ISBN: 9788966262571