(light)
| 134 | |
| 135 | print("Example 8") |
| 136 | def take_unpacking_action(light): |
| 137 | try: |
| 138 | (RED,) = (light,) |
| 139 | except TypeError: |
| 140 | # Did not match |
| 141 | pass |
| 142 | else: |
| 143 | # Matched |
| 144 | print(f"{RED=}, {light=}") |
| 145 | |
| 146 | |
| 147 | take_unpacking_action(GREEN) |