Skip to main content

Pretty prints Python lists

Project description

Build Status

Pretty prints Python lists.


from nice_list import nice_print, nice_format

nice_print([1, 2, 3, 4])
# -> 1, 2, 3 and 4

nice_print(["Alice", "Bob", "Charles"])
# -> Alice, Bob and Charles

nice_print(["Alice", "Bob", "Charles"], use_and=False)
# -> Alice, Bob, Charles

nice_print(["Alice", "Bob", "Charles", 20], string_quotes='"')
# -> "Alice", "Bob", "Charles" and 20

nice_print([1, 2, 3, 4], oxford_comma=True)
# -> 1, 2, 3, and 4

print(nice_format(["Alice", "Bob", "Charles"]))
# -> Alice, Bob and Charles


pip install nice_list





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 nice-list, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size nice_list-1.1.0-py3-none-any.whl (3.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nice_list-1.1.0.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page