startswith works with a tuple

This commit is contained in:
Rangi 2022-09-30 16:57:47 -04:00
parent 22859c4bb7
commit 2b52ceb718

View File

@ -28,7 +28,7 @@ def main():
if print_bank not in {'all', 'none'}:
try:
print_bank = (int(print_bank[2:], 16)
if print_bank.startswith('0x') or print_bank.startswith('0X')
if print_bank.startswith(('0x', '0X'))
else int(print_bank))
except ValueError:
error = f'Error: invalid BANK: {print_bank}'