<｜begin▁of▁sentence｜>### Instruction:
Given two graph objects G and H, where G contains the edges [(0, 1), (0, 2), (1, 2)] and H contains the edges [(0, 3), (1, 2), (2, 3)], how can you use NetworkX to create a new graph containing only the edges that are present in both G and H? After creating this new graph, how can you list its nodes and edges?
### Response:
import networkx as nx

# Create the first graph G
G = nx.Graph()
G.add_edges_from([(0, 1), (0, 2), (1, 2)])

# Create the second graph H
H = nx.Graph()
H.add_edges_from([(0, 3), (1, 2), (2, 3)])

# Create a new graph that is the intersection of G and H
R = nx.intersection(G, H)

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