How to turn a string that contains an array into a normal array without using external modules? For example: “a[0]”
into a[0]
edit:
I have seen a few complains about the amount of information in this post so I will add some more details about my problem for everyone watching this in future: My intention was to write a string that contains ”array[…]”
somewhere in it but I need to execute this array somehow and my best choice was to remove the quotes around it but I don’t want to use eval()
because of a few security issues
edit 2: or tell me, how to express an equation in python without instantly solving it and without importing modules