<｜begin▁of▁sentence｜>### Instruction:
Given two graphs G with edges [(0, 1), (0, 2), (1, 2), (1, 3)] and H with edges [(0, 1), (1, 2), (0, 3)], how can we create a new graph containing the edges that are in either G or H but not in both, considering that G and H must have the same node sets?
### Response:
import networkx as nx

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

# Calculate the symmetric difference
R = nx.symmetric_difference(G, H)

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