I have a list of decimal fixed point numbers:
latitude = Places.query.with_entities(Places.latitude).all()
result = []
for i in range(len(latitude)):
result.append(latitude[i][0])
print result
The output of latitude is this I wanted to map them to Radians. So, I did this:
lat_ = map(lambda i: radians(i), result)
But got an errorTypeError: a float
is required
I want to know what is the correct way to do this operation. `
Edit
Now the result looks like this:
[28.633, 29.333,...]
And error is:
TypeError: float() argument must be a string or a number
Try this: