<｜begin▁of▁sentence｜>### Instruction:
Given a simple undirected graph with vertices connected in a line from A to D, how can you print the distances from vertex 'A' to all other vertices in the graph using the igraph Python library?
### Response:
import igraph as ig

# Create a simple undirected graph with A connected to B, B connected to C, and C connected to D
g = ig.Graph.Formula("A--B--C--D")

# Get distances from vertex with name 'A'
vertex_A = g.vs.find(name='A')
distances_from_A = vertex_A.distances()

# Print the distances from 'A'
print(distances_from_A)
<|EOT|>
