Update abbreviation.py (#1887)

This commit is contained in:
Sanders Lin 2020-04-18 02:04:30 +08:00 committed by GitHub
parent 0feed0bfb8
commit 1c9d4a3929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()