<｜begin▁of▁sentence｜>### Instruction:
Given a graph which you can read from a .ncol file named data.ncol, can you create an undirected graph with igraph where the vertices have names and edges have weights if they are present in the file?
### Response:
from igraph import Graph

# Read the .ncol file
file_path = 'data.ncol'
g = Graph.Read_Ncol(file_path, names=True, weights='auto', directed=False)

# Assuming the .ncol file contains weighted edges and names, print vertex names and edge weights
g.vs['name']  # Vertex names
[(edge.tuple, edge['weight']) for edge in g.es]  # List of edge tuples with weights
<|EOT|>
