Skip to main content

Printing each items in list (nested or not) on new line with or without required tab spaces and the data will be sent to the required file or output screen depending on the file object argument

Project description

  1. This function takes a positional arguments called "the_list","indent" and "level", 'the_list' is any Python list (of - possibly - nested lists). Each data item in the provided list is (recursively) printed to the screen on it's own line.
  2. A second argument 'indent' is set to default value 'False', which means indentation or tab-stops are not required by default. If user wants to add indentation while printing the nested list it should be set to 'True'.
  3. A Third argument 'level' is used to insert required number of tab_stops when nested list is encountered.
  4. Fourth argument 'fh' is used to specify where the output of this function should write (place to write your data to), a default value of this argument is sys.stdout so that it continues to write to the screen if no file object is specified when the function is invoked.

Project details


Download files

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

Source Distribution

nester_with_fileObject-1.0.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nester_with_fileObject-1.0.0-py3.10.egg (3.3 kB view details)

Uploaded Egg

nester_with_fileObject-1.0.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file nester_with_fileObject-1.0.0.tar.gz.

File metadata

  • Download URL: nester_with_fileObject-1.0.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for nester_with_fileObject-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1cd525b3ed256a57011ed83b879e3224e57aa60e59b71f1046c92e474375a366
MD5 22ba82a16c13dfbb3351b191dd6fc822
BLAKE2b-256 e698dfbbd2759047309f4acaf58bde75c70d45d7b8cbd1f871d5a8ff3bad4648

See more details on using hashes here.

File details

Details for the file nester_with_fileObject-1.0.0-py3.10.egg.

File metadata

File hashes

Hashes for nester_with_fileObject-1.0.0-py3.10.egg
Algorithm Hash digest
SHA256 4a1fecca00e984f2585b4c2547120a7e72b77be8fd149056e8c3d6a525a9e83b
MD5 f545ddce76fccfbfa69bd8d629565384
BLAKE2b-256 010680eff5e4b024fc9f50d7218eb04e2e690c266113a43a755a9c3f333ab72b

See more details on using hashes here.

File details

Details for the file nester_with_fileObject-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nester_with_fileObject-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c26824bf80852deee9b12c6941d3645729ed9a306cc7ae2877438cda4f791145
MD5 9ff9e3a89692c15a702a2a23c0acef6b
BLAKE2b-256 e1142f1438979e54326d3e76e3254e0abecdf0e0170c284af76cadf6030d2824

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page