I have a code that uses functions to calculate the closest edge of a station id based on its geographical coordinates.
The output is a line like this (format xml):
<edge id="4260662#2" from="1977648762" to="2600872721"/>
I need to extract only the id value from this line which is in this example: 4260662#2, so I tried to use for loop, I put the line in a string named "ch" but when I did "for i in ch:" , it shows me an error: TypeError: iteration over non-sequence.
I tried many solutions but they did not work, can you help me please?