<｜begin▁of▁sentence｜>### Instruction:
Given a graph data in node-link format as a JSON string, how can we create and print the edges of a NetworkX graph from this data?
### Response:
import networkx as nx
import json

# Assume we have a graph data in node-link format as JSON
ndata = '{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": "A"}, {"id": "B"}], "links": [{"source": "A", "target": "B"}]}'

# Convert JSON string to dictionary
graph_data = json.loads(ndata)

# Create a graph from the node-link data
G = nx.node_link_graph(graph_data)

# Print the edges of the graph
print(G.edges())
# Output: [('A', 'B')]
<|EOT|>
