On Tue, May 19, 2020 at 9:43 PM David Mertz <mertz@gnosis.cx> wrote:
Currently, I'd probably program my intention like this.  Let's assume this is something where the '=' is allowed in the middle.

Getting increasingly hypothetical...

Anyway, you could write:

```
assert not salt.endswith("=" * 3)  # at most 2 ='s allowed
salt = salt.rstrip("=")
```