The JSON format is commonly used by modern applications to allow for data exchange. Many programmers are already familiar with it, which makes it a good choice for interoperability.
import json
x = [1, 3, 'apple', 'banana', 'coconut']
json.dumps(x)