<｜begin▁of▁sentence｜>### Instruction:
Imagine you're a commercial pilot preparing for a flight. You've been given a navigation chart that details the routes between various waypoints, represented by nodes 1, 2, 3, and 4, with the paths being (1, 2), (1, 3), and (2, 4), just like a graph with edges defining possible flight paths. Before takeoff, you need to ensure this flight route data is stored in the aircraft's system for your co-pilot's reference. You are tasked with translating this route information into a digital format, specifically by writing this edge list into a file named 'example.edgelist', making sure to use the '#' for any remarks, separating the values with commas, and encoding this information in 'utf-8' for compatibility with your onboard systems. This is akin to sharing this information with your team for further analysis or to aid in flight visualization during your journey.
### Response:
import networkx as nx
G = nx.Graph()
G.add_edges_from([(1, 2), (1, 3), (2, 4)])
nx.write_edgelist(G, 'example.edgelist', comments='#', delimiter=',', data=True, encoding='utf-8')
<|EOT|>
