programming-examples/python/String/Python program to display formatted text (width=50) as output.py

11 lines
407 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
import textwrap
sample_text = '''
Python is a widely used high-level, general-purpose, interpreted,
dynamic programming language. Its design philosophy emphasizes
code readability, and its syntax allows programmers to express
concepts in fewer lines of code than possible in languages such
as C++ or Java.
'''
print()
print(textwrap.fill(sample_text, width=50))
print()