We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e2c034 commit c5a2a65Copy full SHA for c5a2a65
python-set/disjoint.py
@@ -1,9 +1,6 @@
1
def verify_purchase(age, selection, restricted_products):
2
- if age < 21:
3
- if not selection.isdisjoint(restricted_products):
4
- print("Purchase denied: products restricted to underage users")
5
- else:
6
- print("Purchase approved")
+ if age < 21 and not selection.isdisjoint(restricted_products):
+ print("Purchase denied: products restricted to underage users")
7
else:
8
print("Purchase approved")
9
0 commit comments