<｜begin▁of▁sentence｜>### Instruction:
Given two graphs G and H with edge sets G = [(0, 1), (0, 2), (1, 2), (1, 3)] and H = [(0, 1), (1, 2), (0, 3)], can you use NetworkX to create a new graph that contains the edges which are in G but not in H, ensuring that G and H have the same set of nodes?
### Response:
import networkx as nx

# Create two graphs G and H with the same node sets
G = nx.Graph([(0, 1), (0, 2), (1, 2), (1, 3)])
H = nx.Graph([(0, 1), (1, 2), (0, 3)])

# Calculate the difference between G and H
R = nx.difference(G, H)

# Output the nodes and edges of the resulting graph
print('Nodes in the difference graph:', R.nodes())
print('Edges in the difference graph:', R.edges())
<|EOT|>
