<｜begin▁of▁sentence｜>### Instruction:
Given a file named 'path_to_file.txt' which contains a weighted edge list with numeric weights, can you create a NetworkX graph with the appropriate edge weights and provide the list of edges with their associated weights using the 'read_weighted_edgelist' function?
### Response:
import networkx as nx

# Read the weighted edge list from 'path_to_file.txt'
# Assume that the file contains the following:
# A B 3.0
# B C 4.0
# A C 5.0
# This file format means that A is connected to B with a weight of 3, B is connected to C with a weight of 4, and A is connected to C with a weight of 5
G = nx.read_weighted_edgelist('path_to_file.txt', nodetype=int)

# Print the edges with weights
ebunch = [(u, v, d['weight']) for u, v, d in G.edges(data=True)]
print(ebunch)
<|EOT|>
