<｜begin▁of▁sentence｜>### Instruction:
Given a lollipop graph with nodes (0 to 6) and edges where nodes 1 and 2 have a 'weight' attribute set to 3, and nodes 3 and 4 have a 'capacity' attribute set to 12, generate the edge list using the NetworkX function 'generate_edgelist'. The output should be provided without edge data, with all edge data, and with a selected edge data attribute 'weight'.
### Response:
import networkx as nx

# Create a lollipop graph
G = nx.lollipop_graph(4, 3)

# Add some edge attributes
g[1][2]['weight'] = 3
G[3][4]['capacity'] = 12

# Use generate_edgelist to print the edge list without data
for line in nx.generate_edgelist(G, data=False):
    print(line)

# Output with no edge data:
# 0 1
# 0 2
# 0 3
# 1 2
# 1 3
# 2 3
# 3 4
# 4 5
# 5 6

# Print the edge list with default data (dictionary format)
for line in nx.generate_edgelist(G):
    print(line)

# Output with default edge data:
# 0 1 {}
# 0 2 {}
# 0 3 {}
# 1 2 {'weight': 3}
# 1 3 {}
# 2 3 {}
# 3 4 {'capacity': 12}
# 4 5 {}
# 5 6 {}

# Print the edge list with selected data attributes (list format)
for line in nx.generate_edgelist(G, data=['weight']):
    print(line)

# Output with selected edge data:
# 0 1
# 0 2
# 0 3
# 1 2 3
# 1 3
# 2 3
# 3 4
# 4 5
# 5 6
<|EOT|>
