Although you have already answered how to do it using python "to dry" (with its string functions), I think I have an answer that uses a library more appropriate to your problem, which will allow you to convert similar data types (based on WKT) that may appear in the future.
In your question history I have seen that you have several related to geometric data and that in some of them you use the python library shapely . Well, this library has functions for parsing of WKT strings, of which your case is an example. Once you have parsed them, it offers you lots of methods to operate on them, such as calculating your area, intersections with others, checking whether or not it contains a point, etc.
For example, running the following on a notebook:
from shapely.wkt import loads
cadena = 'POLYGON ((-58.612406970999984 -34.55196600599993, -58.61272573499997 -34.552244351999946, -58.611851334999983 -34.552907077999976, -58.611473561999958 -34.552566878999983, -58.612331868999945 -34.55191298799997, -58.612406970999984 -34.55196600599993))'
g = loads(cadena)
And in g
you have a variable of type shapely.geometry.polygon.Polygon
, which among other things knows how to draw:
>>> g
Get your area, or your centroid:
>>> print(g.area, g.centroid)
5.468957898656394e-07 POINT (-58.61209796852194 -34.5524066377988)
And what you were looking for, the list of coordinates of its outline:
>>> list(g.boundary.coords)
[(-58.612406970999984, -34.55196600599993),
(-58.61272573499997, -34.552244351999946),
(-58.61185133499998, -34.552907077999976),
(-58.61147356199996, -34.55256687899998),
(-58.612331868999945, -34.55191298799997),
(-58.612406970999984, -34.55196600599993)]