Word Wrapping in Google Colab using textwrap
import textwrap
wrapper = textwrap.TextWrapper(width=40,
initial_indent=" " * 4,
subsequent_indent=" " * 4,
break_long_words=False,
break_on_hyphens=False)
print(
wrapper.fill(string))
source
Komentar
Posting Komentar