<｜begin▁of▁sentence｜>### Instruction:
Given an undirected graph with edge set [(1, 2), (2, 3), (3, 1), (3, 4)], can you compute and list the node connectivity for all pairs of nodes using NetworkX?
### Response:
import networkx as nx

# Create an undirected graph
G = nx.Graph()
G.add_edges_from([(1, 2), (2, 3), (3, 1), (3, 4)])

# Compute node connectivity for all pairs of nodes
all_pairs_connectivity = nx.all_pairs_node_connectivity(G)

# Print node connectivity for each pair
for pair in all_pairs_connectivity:
    print(f'Node connectivity between {pair[0]} and {pair[1]}: {all_pairs_connectivity[pair]}')
<|EOT|>
