<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edge set [(0, 1), (0, 2), (2, 3), (3, 4)], how can you set a 'weight' attribute for each edge with values [1.0, 2.0, 3.0, 4.0] using the set_attribute_values function from igraph and print out the edge tuples along with their respective weights?
### Response:
from igraph import Graph

# Create a graph with predefined edges
edges = [(0, 1), (0, 2), (2, 3), (3, 4)]
g = Graph(edges=edges)

# Set an edge attribute called 'weight' for all edges
g.es['weight'] = [1.0, 2.0, 3.0, 4.0]

# Print the edges and their weights
for edge in g.es:
    print(f'Edge {edge.tuple} has weight: {edge['weight']}')
<|EOT|>
