4 ms·
Similarly with 9.2, assignment using a walrus operator will also fail if the value is 0 (or anything falsy: https://docs.python.org/3/library/stdtypes.html#trut
by TACD 1y ago
Similarly with 9.2, assignment using a walrus operator will also fail if the value is 0 (or anything falsy: https://docs.python.org/3/library/stdtypes.html#truth-value-testing https://docs.python.org/3/library/stdtypes.html#truth-value-...)
- maleldil 1y agoYou can use `if (response := get_user_input()) is not None` if that's important. IME, empty strings and None would be treated the same way.