Run
import json # Given list x = ['apple', 'banana', 100, 200] # Convert list to JSON string x_json = json.dumps(x) # Print the list in JSON format print(x_json)
Output