mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
refactor: Indent ... for visual purposes (#7744)
This commit is contained in:

committed by
GitHub

parent
e8915097c4
commit
9bba42eca8
@ -18,15 +18,15 @@ def hex_to_decimal(hex_string: str) -> int:
|
||||
-255
|
||||
>>> hex_to_decimal("F-f")
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
...
|
||||
ValueError: Non-hexadecimal value was passed to the function
|
||||
>>> hex_to_decimal("")
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
...
|
||||
ValueError: Empty string was passed to the function
|
||||
>>> hex_to_decimal("12m")
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
...
|
||||
ValueError: Non-hexadecimal value was passed to the function
|
||||
"""
|
||||
hex_string = hex_string.strip().lower()
|
||||
|
Reference in New Issue
Block a user