realpython.com
Open in
urlscan Pro
2606:4700:10::ac43:2b37
Public Scan
Submitted URL: http://realpython.com/
Effective URL: https://realpython.com/
Submission: On October 21 via manual from US — Scanned from DE
Effective URL: https://realpython.com/
Submission: On October 21 via manual from US — Scanned from DE
Form analysis
7 forms found in the DOMGET /search
<form class="form-inline w-100" action="/search" method="GET">
<a class="js-search-form-submit position-absolute" href="/search" title="Search"><i class="fa fa-search fa-fw text-muted pl-2" aria-hidden="true"></i></a>
<input class="search-field form-control form-control-md mr-sm-1 mr-lg-2 w-100" style="padding-left: 2rem;" maxlength="50" type="search" placeholder="Search" aria-label="Search" name="q" autocomplete="off">
<input type="hidden" name="_from" value="nav">
</form>
POST /optins/process/
<form class="card-body" action="/optins/process/" method="post">
<div class="form-group">
<p class="h5 text-muted text-center">— FREE Email Series —</p>
<p class="h3 text-center">🐍 Python Tricks 💌</p>
<p><img class="img-fluid rounded" src="https://cdn.realpython.com/static/pytrick-dict-merge.4201a0125a5e.png" width="738" height="490" alt="Python Tricks Dictionary Merge"></p>
</div>
<div class="form-group">
<input type="hidden" name="csrfmiddlewaretoken" value="32tihhwJGoQMjMuT5lKlRNsEG15kpAyK06MufmByvdCEyI2b6rcdT91Z36CdtiRS">
<input type="hidden" name="slug" value="static-python-tricks-sidebar">
<input type="email" class="form-control form-control-md" name="email" placeholder="Email…" required="">
</div>
<button type="submit" name="submit" class="btn btn-primary btn-md btn-block">Get Python Tricks »</button>
<p class="mb-0 mt-2 text-muted text-center">🔒 No spam. Unsubscribe any time.</p>
</form>
GET /search
<form class="form-inline col p-0" action="/search" method="GET" id="home-search-form">
<a class="js-search-form-submit position-absolute" href="/search" title="Search"><i class="fa fa-search fa-fw text-muted pl-2" aria-hidden="true"></i></a>
<input class="form-control form-control-lg w-100" style="padding-left: 2rem;" maxlength="50" type="search" placeholder="Search Tutorials, Courses, Quizzes, Learning Paths…" aria-label="Search" name="q" autocomplete="off">
<input type="hidden" name="_from" value="home">
</form>
GET /search
<form class="form-inline col p-0" action="/search" method="GET" id="home-search-form">
<a class="js-search-form-submit position-absolute" href="/search" title="Search"><i class="fa fa-search fa-fw text-muted pl-2" aria-hidden="true"></i></a>
<input class="form-control form-control-lg w-100" style="padding-left: 2rem;" maxlength="50" type="search" placeholder="Search Tutorials, Courses, Quizzes, Learning Paths…" aria-label="Search" name="q" autocomplete="off">
<input type="hidden" name="_from" value="home">
</form>
<form id="drip-form-108609">
<div style="display: none">
<input type="hidden" name="form_id" value="108609">
</div>
<dl class="no-labels">
<dt class="label-for-type-email"> Email Address <span title="Required"> *</span>
</dt>
<dd>
<input type="email" name="fields[email]" value="" placeholder="Email Address" class="drip-text-field" id="drip-email-field-108609" tabindex="0">
<div id="drip-errors-for-email-108609" class="drip-errors"></div>
</dd>
<dt class="label-for-type-eu_consent">
</dt>
<dd>
<div class="zenput zenput--checkbox show" data-container="eu-checkbox">
<input type="hidden" name="fields[eu_consent]" id="drip-field-eu_consent-108609-denied" value="denied" disabled="disabled">
<input type="checkbox" name="fields[eu_consent]" id="drip-field-eu_consent-108609" value="granted" disabled="disabled">
<label class="zenput__checkbox-label" for="drip-field-eu_consent-108609">Receive the Real Python newsletter and get notified about new tutorials we publish on the site, as well as occasional special offers. <div
class="zenput__checkbox-label__icon"><svg class="octicon octicon-check" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true">
<path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path>
</svg></div>
</label>
</div>
</dd>
<input type="hidden" name="fields[eu_consent_message]" value="Receive the Real Python newsletter and get notified about new tutorials we publish on the site, as well as occasional special offers." tabindex="-1">
<div style="display: none;" aria-hidden="true">
<dt for="website">Website</dt>
<dd>
<input type="text" id="website" name="website" placeholder="Website" class="drip-text-field" tabindex="-1" autocomplete="false" value="">
</dd>
</div>
</dl>
<div class="form-controls">
<input type="submit" name="submit" value="Send My Python Cheat Sheet »" id="drip-submit-108609" class="drip-submit-button">
</div>
<div id="drip-errors-for-base-108609" class="drip-errors dfwid-error"></div>
</form>
<form id="drip-form-108599">
<div style="display: none">
<input type="hidden" name="form_id" value="108599">
</div>
<dl class="no-labels">
<dt class="label-for-type-email"> Email Address <span title="Required"> *</span>
</dt>
<dd>
<input type="email" name="fields[email]" value="" placeholder="Email Address" class="drip-text-field" id="drip-email-field-108599" tabindex="0">
<div id="drip-errors-for-email-108599" class="drip-errors"></div>
</dd>
<dt class="label-for-type-eu_consent">
</dt>
<dd>
<div class="zenput zenput--checkbox show" data-container="eu-checkbox">
<input type="hidden" name="fields[eu_consent]" id="drip-field-eu_consent-108599-denied" value="denied" disabled="disabled">
<input type="checkbox" name="fields[eu_consent]" id="drip-field-eu_consent-108599" value="granted" disabled="disabled">
<label class="zenput__checkbox-label" for="drip-field-eu_consent-108599">Receive the Real Python newsletter and get notified about new tutorials we publish on the site, as well as occasional special offers. <div
class="zenput__checkbox-label__icon"><svg class="octicon octicon-check" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true">
<path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path>
</svg></div>
</label>
</div>
</dd>
<input type="hidden" name="fields[eu_consent_message]" value="Receive the Real Python newsletter and get notified about new tutorials we publish on the site, as well as occasional special offers." tabindex="-1">
<div style="display: none;" aria-hidden="true">
<dt for="website">Website</dt>
<dd>
<input type="text" id="website" name="website" placeholder="Website" class="drip-text-field" tabindex="-1" autocomplete="false" value="">
</dd>
</div>
</dl>
<div class="form-controls">
<input type="submit" name="submit" value="Get Sample Chapter »" id="drip-submit-108599" class="drip-submit-button">
</div>
<div id="drip-errors-for-base-108599" class="drip-errors dfwid-error"></div>
</form>
<form id="drip-form-106703">
<div style="display: none">
<input type="hidden" name="form_id" value="106703">
</div>
<dl class="no-labels">
<dt class="label-for-type-email"> Email Address <span title="Required"> *</span>
</dt>
<dd>
<input type="email" name="fields[email]" value="" placeholder="Email Address" class="drip-text-field" id="drip-email-field-106703" tabindex="0">
<div id="drip-errors-for-email-106703" class="drip-errors"></div>
</dd>
<dt class="label-for-type-eu_consent">
</dt>
<dd>
<div class="zenput zenput--checkbox show" data-container="eu-checkbox">
<input type="hidden" name="fields[eu_consent]" id="drip-field-eu_consent-106703-denied" value="denied" disabled="disabled">
<input type="checkbox" name="fields[eu_consent]" id="drip-field-eu_consent-106703" value="granted" disabled="disabled">
<label class="zenput__checkbox-label" for="drip-field-eu_consent-106703">Receive the Real Python newsletter and get notified about new tutorials we publish on the site, as well as occasional special offers. <div
class="zenput__checkbox-label__icon"><svg class="octicon octicon-check" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true">
<path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path>
</svg></div>
</label>
</div>
</dd>
<input type="hidden" name="fields[eu_consent_message]" value="Receive the Real Python newsletter and get notified about new tutorials we publish on the site, as well as occasional special offers." tabindex="-1">
<div style="display: none;" aria-hidden="true">
<dt for="website">Website</dt>
<dd>
<input type="text" id="website" name="website" placeholder="Website" class="drip-text-field" tabindex="-1" autocomplete="false" value="">
</dd>
</div>
</dl>
<div class="form-controls">
<input type="submit" name="submit" value="Send Python Tricks »" id="drip-submit-106703" class="drip-submit-button">
</div>
<div id="drip-errors-for-base-106703" class="drip-errors dfwid-error"></div>
</form>
Text Content
* Start Here * Learn Python Python Tutorials → In-depth articles and video courses Learning Paths → Guided study plans for accelerated learning Quizzes → Check your learning progress Browse Topics → Focus on a specific area or skill level Community Chat → Learn with other Pythonistas Office Hours → Live Q&A calls with Python experts Podcast → Hear what’s new in the world of Python Books → Round out your knowledge and learn offline Unlock All Content → * More Python Learning Resources Python Newsletter Python Job Board Meet the Team Become a Tutorial Author Become a Video Instructor * Search * Join * Sign‑In REAL PYTHON TUTORIALS NEW BUILD A TIC-TAC-TOE GAME ENGINE WITH AN AI PLAYER IN PYTHON In this step-by-step tutorial, you'll build a universal game engine in Python with tic-tac-toe rules and two computer players, including an unbeatable AI player using the minimax algorithm. You'll also create a text-based graphical front end for your library and explore two alternative front ends. Oct 19, 2022 advanced best-practices gamedev gui projects python — FREE Email Series — 🐍 Python Tricks 💌 Get Python Tricks » 🔒 No spam. Unsubscribe any time. All Tutorial Topics advanced api basics best-practices community databases data-science devops django docker flask front-end gamedev gui intermediate machine-learning projects python testing tools web-dev web-scraping EXPLORE REAL PYTHON Learning Paths Guided study plans for accelerated learning Python Tutorials In-depth articles and step-by-step video courses Quizzes Check your learning progress Browse Topics Focus on a specific area or skill level Community Chat Learn with other Pythonistas Office Hours Live Q&A calls with an expert from the Real Python Team Podcast Hear what’s new in the world of Python programming Books Round out your knowledge and learn offline Search » NEW RELEASES View All » PYTHON BASICS: NUMBERS AND MATH Oct 18, 2022 basics python A PRACTICAL INTRODUCTION TO WEB SCRAPING IN PYTHON Oct 17, 2022 intermediate web-scraping CHATTERBOT: BUILD A CHATBOT WITH PYTHON Oct 12, 2022 intermediate projects python PROVIDING MULTIPLE CONSTRUCTORS IN YOUR PYTHON CLASSES Oct 11, 2022 intermediate python PYTHON NEWS: WHAT'S NEW FROM SEPTEMBER 2022? Oct 10, 2022 community MINIMAX IN PYTHON: LEARN HOW TO LOSE THE GAME OF NIM Oct 05, 2022 gamedev intermediate Remove ads PYTHON BASICS: STRINGS AND STRING METHODS Oct 04, 2022 basics python BUILD ENUMERATIONS OF CONSTANTS WITH PYTHON'S ENUM Oct 03, 2022 intermediate python CUSTOM PYTHON STRINGS: INHERITING FROM STR VS USERSTRING Sep 28, 2022 intermediate python SNEAKY REST APIS WITH DJANGO NINJA Sep 27, 2022 api intermediate web-dev HOW TO ADD PYTHON TO PATH Sep 26, 2022 basics python WHAT DOES IF __NAME__ == "__MAIN__" DO IN PYTHON? Sep 21, 2022 best-practices intermediate BUILDING PYTHON PROJECT DOCUMENTATION WITH MKDOCS Sep 20, 2022 intermediate projects python WHEN DO YOU USE AN ELLIPSIS IN PYTHON? Sep 19, 2022 best-practices intermediate HOW TO REPLACE A STRING IN PYTHON Sep 14, 2022 basics best-practices PYTHON BASICS: CONDITIONAL LOGIC AND CONTROL FLOW Sep 13, 2022 basics python CUSTOM PYTHON LISTS: INHERITING FROM LIST VS USERLIST Sep 12, 2022 intermediate python HTML AND CSS FOR PYTHON DEVELOPERS Sep 07, 2022 basics django flask front-end web-dev Load More Search » Remove ads © 2012–2022 Real Python ⋅ Newsletter ⋅ Podcast ⋅ YouTube ⋅ Twitter ⋅ Facebook ⋅ Instagram ⋅ Python Tutorials ⋅ Search ⋅ Privacy Policy ⋅ Energy Policy ⋅ Advertise ⋅ Contact ❤️ Happy Pythoning! GET THE PYTHON CHEAT SHEET Enter your email address below and we'll send you the Python cheat sheet right away: Email Address * Receive the Real Python newsletter and get notified about new tutorials we publish on the site, as well as occasional special offers. Website ALMOST THERE... We emailed you the cheat sheet. Please check your inbox in a few minutes. GET A SAMPLE CHAPTER FROM THE FIRST COURSE Enter your email address below and we'll send you the sample chapter right away: Email Address * Receive the Real Python newsletter and get notified about new tutorials we publish on the site, as well as occasional special offers. Website ALMOST THERE... We emailed you the sample chapter. Please check your inbox in a few minutes. IMPROVE YOUR PYTHON IMPROVE YOUR PYTHON ...with a fresh 🐍 Python Trick 💌 code snippet every couple of days: Email Address * Receive the Real Python newsletter and get notified about new tutorials we publish on the site, as well as occasional special offers. Website ALMOST THERE... Check your inbox. I'm sending you the first Python Trick right now.