Write a code in Python to parse a JSON string.
{
    "name": "James",
    "age": 27
}
import json

json_string = '{"name": "James","age": 27}'
data = json.loads(json_string)
print(data["name"], data["age"])