<｜begin▁of▁sentence｜>### Instruction:
Given a graph whose edge set is [(0, 1), (1, 2), (3, 4)], with 5 nodes and 2 connected components, compute the Laplacian spectrum using NetworkX.
### Response:
import networkx as nx
import numpy as np

# Create a graph with 5 nodes and 2 connected components
G = nx.Graph()
G.add_nodes_from(range(5))
G.add_edges_from([(0, 1), (1, 2), (3, 4)])

# Compute the Laplacian spectrum
spect = nx.laplacian_spectrum(G)
print('Laplacian spectrum:', np.round(spect, 2))
<|EOT|>
