I have a list...
delimiterList = ["[", "]", "{", "}", ","]
def getData():
Input = input("Enter JSON")
return Input
def saveInputAsList(input):
inputList = []
for i in input:
inputList.append(i)
return inputList
def Format():
input = saveInputAsList(getData())
if delimiterList in input:
input.append('\n')
return input
print(Format())
- ask user for input, save to list I want to loop through the list
- If any strings in my delimiterlist in user input append '\n' to list
- the output should be ['a', '"', '\n', 'b', '[', '\n']
I'm trying to work on a JSON beautifier without using libraries