human
Give me a Python code to put a json in a file.
assistant
Here is a Python code to put json in file

import json

def put_json_in_file(json_string, file_name):
    """put json in file"""
    with open(file_name, 'w') as f:
        f.write(json_string)

# Enter the json string
json_string = "{\"a\": 1, \"b\": 2, \"c\": 3}"

# Calling the function
print((put_json_in_file(json_string, "test.json")))

#Example Output
# None

#Remember to inspect code for bugs.