Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

list-fmt

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

list-fmt

Format Iterables

  • 0.0.1
  • PyPI
  • Socket score

Maintainers
1

list-fmt

Format iterables into human readable text.

Installation

pip install list-fmt

Basic Usage

>>> from listfmt import join_with
>>> L = ["one", "two", "three"]
>>> join_with(L, join_last = " and ")
'one, two and three'
>>> 
>>> from listfmt import strjoin
>>> strjoin(", ", [1, 2, 3])
'1, 2, 3'
>>> 
>>> from list import ordered_list
>>> print(ordered_list(["one", "two", "three"], style = "A"))
A. one
B. two
C. three
>>> 
>>> from listfmt import unordered_list
>>> print(unordered_list(["one", "two", ["a", "b"], "three"], recursive = True))
* one
* two
  * a
  * b
* three
>>> 
  • Repository
  • Documentation
  • PyPI

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc