Be the First 1 (leave only the first Truthy) Intro
Every year, Dyalog Ltd. holds a student competition. The challenge there is to write good APL code. This is a language agnostic code-golf edition of this year's eighth problem.
I have explicit permission to post this challenge here from the original author of the competition. Feel free to verify by following the provided link and contacting the author.
Problem
Given a Boolean* list, &quot;turn off&quot; all the Truthies after the first Truthy.
No Truthies? No problem! Just return the list unmodified.
Examples
[falsy,truthy,falsy,truthy,falsy,falsy,truthy] → [falsy,truthy,falsy,falsy,falsy,falsy,falsy]
[] → []
[falsy,falsy,falsy,falsy] → [falsy,falsy,falsy,falsy]

* All your truthies must be identical, and all your falsies must be identical. This includes output.
Python 2, 35 bytes



while 1:b=input();print b;True&amp;=b&lt;1


Try it online! Input and output are lines of True/False.

Based on Dennis's solution. Redefines the variable True to be False after a True input is encountered. That way, any further inputs of True will evaluate to False and be printed as such. Python 3 no longer allows True and False to be redefined, so this answer uses Python 2.

The redefinition is True&amp;=b&lt;1, i.e. True = True &amp; (b&lt;1). When the input b is True, then (b&lt;1) is False (since True==1), so True becomes False. See Kevin Cruijssen's answer for a shorter way to handle this redefinition.