Skip to main content

Checks if brackets are closed given a string

Project description

bracket_closed

Checks if all brackets in a string are balanced

Example code:

from brackets_closed import close_check

close_check.is_closed("([])")
close_check.is_closed("([)]")
close_check.is_closed("[](){{{{[]}}}}")
close_check.is_closed("][][")
close_check.is_closed("print('This(is) a test to see { if this code { will extract }} brackets [] fro[m a string] that is not {} just brackets!')")

Output from example:

True
False
True
False
True

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

brackets_closed-0.9.tar.gz (1.5 kB view details)

Uploaded Source

File details

Details for the file brackets_closed-0.9.tar.gz.

File metadata

  • Download URL: brackets_closed-0.9.tar.gz
  • Upload date:
  • Size: 1.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for brackets_closed-0.9.tar.gz
Algorithm Hash digest
SHA256 684dc54d30543e85b3b796af61d4ce58a15b1476d233e5056a6f66b348ead938
MD5 c71e42bb2ca271ad77264432997fe280
BLAKE2b-256 a31bbcd4b281441a4b24c3b15e0c68bd34ce021241503264a8a725fbd1bfc6b4

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