"""The MIT License (MIT)
Copyright (c) 2016-2020 Davide Zanotti
+
Modifications Copyright (c) 2021-2022 Scott Gasch
Permission is hereby granted, free of charge, to any person obtaining a copy
Returns:
An interpolated string capturing print output, like man(3)
- :code:sprintf.
+ `sprintf`.
"""
ret = ""
def bigrams(txt: str):
- """Generates the bigrams (n=2) of the given string."""
+ """Generates the bigrams (n=2) of the given string.
+
+ >>> [x for x in bigrams('this is a test')]
+ ['this is', 'is a', 'a test']
+ """
return ngrams(txt, 2)