<｜begin▁of▁sentence｜>### Instruction:
Given the dimension n of a hypercube, how can you create and list out the nodes and edges of the n-dimensional hypercube graph using NetworkX?
### Response:
import networkx as nx

# Define the dimension of the hypercube
dim = 3

# Generate the hypercube graph of the specified dimension
H = nx.hypercube_graph(dim)

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