So I have this code in C#:
double latitude = 0.323 //Some random value for SO
double longitude = 0.535 //Some random value for SO
string result = string.Format("{0}, {1}",
latitude.ToString(CultureInfo.InvariantCulture.NumberFormat),
longitude.ToString(CultureInfo.InvariantCulture.NumberFormat));
And I like to convert that into Python code, problem is, I have no idea what NumberFormat
does in this context and how I convert that into Python code.
Could anyone explain to me what the NumberFormat
does in this case? Also, I'm assuming {0}
and {1}
means the first and second value entered after the comma?
I'm not asking what it does in C#, I'm asking if it can be done in Python and how.