Based on this closed question on stack overflow, what is the shortest way to stimulate scope for variables in an input. For simplicity, print is replaced with >.
copying critical information from the linked source:
[and]start and end a new scope.Within scopes any changes to a variable outside of that scope is not permanent and is reverted when the scope has left, but the outer values are used to determine if a variable is undefined and its starting value.
Input will always start with
[and will end with matching]
If its not defined then value should be0
All input that is not a variable is a number with no decimal points. as in10or582
> ameans print the contents ofa
a 10assigns10toa
a bassigns the contents ofbtoa
Variables should be considered strings:one 1is valid syntax
It is not required for the input to contain the print command>
Note on scoring:
You may chose how to input and output the "code", but it should be explained in the answer.
I answered this on the linked page in java, but I did not go for shortest code.
Comment any suggestions or questions, so I can improve my future posts. Shortest code by character wins. Good luck.

