From f901ecd413fa3c4724acafddff4fd75a7e34e832 Mon Sep 17 00:00:00 2001 From: Sarcodian Date: Mon, 23 Jan 2017 15:19:05 +0300 Subject: [PATCH] Added documentation --- challenge_10/python/sarcodian/READ.me | 8 ++++++++ challenge_10/python/sarcodian/src/challenge_10.py | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 challenge_10/python/sarcodian/READ.me diff --git a/challenge_10/python/sarcodian/READ.me b/challenge_10/python/sarcodian/READ.me new file mode 100644 index 000000000..c1c3f5909 --- /dev/null +++ b/challenge_10/python/sarcodian/READ.me @@ -0,0 +1,8 @@ +Takes a string and checks to see every openning {,(,[ +has a corresponding closing ],),}. + +Does this by appending a list of every openning and deletes +the last element when it comes accross a matching closing. + +If the closing is off a different type or if the list has +elements remaining then returns False. \ No newline at end of file diff --git a/challenge_10/python/sarcodian/src/challenge_10.py b/challenge_10/python/sarcodian/src/challenge_10.py index fdb5d1927..ae209bc3d 100644 --- a/challenge_10/python/sarcodian/src/challenge_10.py +++ b/challenge_10/python/sarcodian/src/challenge_10.py @@ -1,5 +1,10 @@ def brackets(): - + ''' + Asks for a string and returns True/False. + True if all openning brackets {([ have a matching ])}, + else returns False + ''' + a_string = input("Please enter a string to process: ") brac_dict = {