<｜begin▁of▁sentence｜>### Instruction:
{'description': "Given a graph whose edge set is [('A', 'B'), ('B', 'C'), ('C', 'D')], how can you generate and print a list of its edges using NetworkX?", 'problem_to_solve': 'Generate a list of edges from a specified graph so that it can be easily iterated over or manipulated as needed.'}
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()
G.add_edges_from([('A', 'B'), ('B', 'C'), ('C', 'D')])

# Generate edgelist from the graph
edgelist = nx.to_edgelist(G)

# Convert edgelist to a list of tuples
edges = list(edgelist)
print(edges)
<|EOT|>
