Skip to main content

This package lets you display lists in form of tables!

Project description

'''Note. If the tables are messed up here it is probably becuase of your computer font'''

This package lets you display lists in form of tables!

to import it we run

import tangly

Now see what we can do to display a table with students and scores:

First we create a list with our data:

my_list = [["Johny", "57"],
	   ["Nath", "89"],
	   ["Alex", "78"],]

Here we defined our list of students and their respective scores. To display this as a table we use the 'table()' command:

tangly.table(my_list)

This will be the output:

┌────────┬─────────┐
| first  | second  |
├────────┼─────────┤
| Johny  | 57      |
| Nath   | 89      |
| Alex   | 78      |
└────────┴─────────┘

Notice that the columns names are 'first' and 'second'. To change this we use some additional parameters:

tangly.table(my_list, 'Student' , 'Score' )

This will be the output:

┌──────────┬────────┐
| Student  | Score  |
├──────────┼────────┤
| Johny    | 57     |
| Nath     | 89     |
| Alex     | 78     |
└──────────┴────────┘

Much Better.

For help inside python type:

tangly.help()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Tangly, version 2.0.2
Filename, size & hash File type Python version Upload date
Tangly-2.0.2.tar.gz (3.3 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page