<｜begin▁of▁sentence｜>### Instruction:
Given a bipartite graph with nodes [1, 2, 3, 4] in one set and ['a', 'b', 'c'] in the other set, and edges [(1, 'a'), (1, 'b'), (2, 'b'), (2, 'c'), (3, 'c'), (4, 'a')], how can you use NetworkX to write this graph's edge list to a text file without any edge data?
### Response:
import networkx as nx

# Create a bipartite graph
B = nx.Graph()
B.add_nodes_from([1, 2, 3, 4], bipartite=0)
B.add_nodes_from(['a', 'b', 'c'], bipartite=1)
B.add_edges_from([(1, 'a'), (1, 'b'), (2, 'b'), (2, 'c'), (3, 'c'), (4, 'a')])

# Write the bipartite graph to a text file
nx.write_edgelist(B, 'bipartite.edgelist', data=False)

# Now re-open and show the contents of the file
with open('bipartite.edgelist', 'r') as f:
    print(f.read())
<|EOT|>
