|
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8"> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
6 | | -<title>Types of Functions in Python: A Complete Guide · Python Programming Series</title> |
| 6 | +<title>Types of Functions in Python: A Complete Guide</title> |
7 | 7 | <meta name="description" content="A complete guide to enumerate, zip, filter, map, reduce, lambda, recursion, and higher-order functions in Python, with real examples from Airbnb, Spotify, Amazon, Reddit, and AWS."> |
8 | 8 | <link rel="preconnect" href="https://fonts.googleapis.com"> |
9 | 9 | <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
|
39 | 39 | a:hover{text-decoration-color:currentColor;} |
40 | 40 | :focus-visible{outline:2px solid var(--accent);outline-offset:2px;} |
41 | 41 |
|
42 | | -.wrap{max-width:680px;margin:0 auto;padding:0 24px;} |
| 42 | +.wrap{max-width:952px;margin:0 auto;padding:0 24px;} |
43 | 43 |
|
44 | 44 | /* Masthead */ |
45 | 45 | .masthead{padding:64px 0 8px;} |
|
104 | 104 | } |
105 | 105 | .code-card .lang{font-family:var(--font-mono);font-size:.68rem;color:#7A8290;letter-spacing:.08em;text-transform:uppercase;} |
106 | 106 | .code-card pre{margin:0;padding:16px 20px;overflow-x:auto;} |
| 107 | +.output-card pre{overflow-x:auto;max-width:100%;} |
107 | 108 | .code-card code{ |
108 | 109 | font-family:var(--font-mono);font-size:.86rem;line-height:1.6; |
109 | 110 | color:var(--code-text);background:none;padding:0; |
|
148 | 149 | body{font-size:17.5px;} |
149 | 150 | .masthead{padding-top:44px;} |
150 | 151 | } |
151 | | - |
152 | | -.series-nav{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0 0 8px;} |
153 | | -.series-nav a{display:block;padding:15px 18px;border:1px solid var(--line);border-radius:6px;background:var(--paper);text-decoration:none;transition:border-color .14s;} |
154 | | -.series-nav a:hover{border-color:var(--accent);} |
155 | | -.series-nav .dir{display:block;font-family:var(--font-mono);font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:5px;} |
156 | | -.series-nav .name{display:block;font-family:var(--font-serif);font-weight:600;font-size:1rem;color:var(--ink);line-height:1.3;} |
157 | | -.series-nav .next{grid-column:2;text-align:right;} |
158 | | -.series-nav .all{grid-column:1/-1;text-align:center;border:none;background:none;padding:4px;font-family:var(--font-mono);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-soft);} |
159 | | -.series-nav .all:hover{border:none;color:var(--accent);} |
160 | | -.kicker a{color:inherit;} |
161 | | -@media(max-width:560px){.series-nav{grid-template-columns:1fr;}.series-nav .next{grid-column:1;text-align:left;}} |
162 | 152 | </style> |
163 | 153 | </head> |
164 | 154 | <body> |
165 | 155 | <div class="wrap"> |
166 | 156 |
|
167 | 157 | <div class="masthead"> |
168 | | - <div class="kicker"><a href="index.html">Python Programming Series</a> · Article 7</div> |
| 158 | + <div class="kicker">Python Programming Series · Article 7</div> |
169 | 159 | <h1 class="title">Types of Functions in Python: A Complete Guide</h1> |
170 | 160 | <p class="dek">Writing your own functions is one skill. Knowing the handful of built-in tools that work <em>with</em> functions, and the different shapes a function itself can take, is a different one. <code>enumerate</code>, <code>zip</code>, <code>filter</code>, <code>map</code>, and <code>reduce</code> all follow a similar pattern: take an iterable, apply some logic to it, and hand back a new result. Lambda functions, recursive functions, and higher-order functions describe different <em>shapes</em> a function can be written in, not new tools exactly, but new ways of thinking about what a function is allowed to do.</p> |
171 | 161 | </div> |
@@ -720,15 +710,8 @@ <h2 id="quick-reference-summary">Quick Reference Summary</h2> |
720 | 710 | </div> |
721 | 711 | </article> |
722 | 712 |
|
723 | | - <nav class="series-nav"> |
724 | | - <a class="prev" href="6_Python_functions.html"><span class="dir">← Previous</span><span class="name">Functions in Python</span></a> |
725 | | - <a class="next" href="8_OOPs_in_Python.html"><span class="dir">Next →</span><span class="name">Object-Oriented Programming</span></a> |
726 | | - <a class="all" href="index.html">All ten articles</a> |
727 | | - </nav> |
728 | | - |
729 | | - |
730 | 713 | </div> |
731 | 714 |
|
732 | | -<footer>Python Programming Series · Article 7 of the course</footer> |
| 715 | +<footer>Python Programming Series — Article 8, verified end to end</footer> |
733 | 716 | </body> |
734 | 717 | </html> |
0 commit comments