mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-08 03:54:26 +08:00
Update abbreviation.py (#1887)
This commit is contained in:
@ -12,7 +12,7 @@ daBcd -> capitalize a and c(dABCd) -> remove d (ABC)
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def abbr(a, b):
|
def abbr(a: str, b: str) -> bool:
|
||||||
"""
|
"""
|
||||||
>>> abbr("daBcd", "ABC")
|
>>> abbr("daBcd", "ABC")
|
||||||
True
|
True
|
||||||
@ -34,7 +34,6 @@ def abbr(a, b):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# print(abbr("daBcd", "ABC")) # expect True
|
|
||||||
import doctest
|
import doctest
|
||||||
|
|
||||||
doctest.testmod()
|
doctest.testmod()
|
||||||
|
Reference in New Issue
Block a user