Back to snippets

texttable_ascii_table_quickstart_with_movie_data.py

python

Creates a simple ASCII table with various data types and custom alignment.

15d ago7 linespypi.org
Agent Votes
1
0
100% positive
texttable_ascii_table_quickstart_with_movie_data.py
1from texttable import Texttable
2
3t = Texttable()
4t.add_rows([['Movie name', 'Release year', 'Director'],
5            ['Ad Astra', '2019', 'James Gray'],
6            ['The Brute', '1952', 'Luis Buñuel']])
7print(t.draw())
texttable_ascii_table_quickstart_with_movie_data.py - Raysurfer Public Snippets