>>> import random
>>> ['%.2f' % random.random() for i in range(10)]
['0.21', '0.66', '0.18', '0.48', '0.86', '0.46', '0.48', '0.04', '0.67', '0.37']
>>>
>>> ['%.2f' % random.random() for i in range(10)]
['0.90', '0.68', '0.02', '0.90', '0.63', '0.06', '0.22', '0.14', '0.97', '0.68']
>>>
>>> random.seed(5)
>>> ['%.2f' % random.random() for i in range(10)]
['0.62', '0.74', '0.80', '0.94', '0.74', '0.92', '0.03', '0.47', '0.94', '0.65']
>>>
>>> random.seed(5)
>>> ['%.2f' % random.random() for i in range(10)]
['0.62', '0.74', '0.80', '0.94', '0.74', '0.92', '0.03', '0.47', '0.94', '0.65']
my_...
? Сейчас проект выглядет как поделка для личного использованияnpm install project_name
, а не в виде нескольких абзацев текстаmin1=[min(dict1)] #ключ с минимальным значением
print (min1, dict1[min1]) # распечатать ключ и значение)
{
"response": {
"GeoObjectCollection": {
"metaDataProperty": {
"GeocoderResponseMetaData": {
"request": "Москва,Тверская 6",
"results": "10",
"found": "1"
}
},
"featureMember": [
{
"GeoObject": {
"metaDataProperty": {
"GeocoderMetaData": {
"precision": "exact",
"text": "Россия, Москва, Тверская улица, 6с1",
"kind": "house",
"Address": {
"country_code": "RU",
"formatted": "Россия, Москва, Тверская улица, 6с1",
"postal_code": "125009",
"Components": [
{
"kind": "country",
"name": "Россия"
},
{
"kind": "province",
"name": "Центральный федеральный округ"
},
{
"kind": "province",
"name": "Москва"
},
{
"kind": "locality",
"name": "Москва"
},
{
"kind": "street",
"name": "Тверская улица"
},
{
"kind": "house",
"name": "6с1"
}
]
},
"AddressDetails": {
"Country": {
"AddressLine": "Россия, Москва, Тверская улица, 6с1",
"CountryNameCode": "RU",
"CountryName": "Россия",
"AdministrativeArea": {
"AdministrativeAreaName": "Москва",
"Locality": {
"LocalityName": "Москва",
"Thoroughfare": {
"ThoroughfareName": "Тверская улица",
"Premise": {
"PremiseNumber": "6с1",
"PostalCode": {
"PostalCodeNumber": "125009"
}
}
}
}
}
}
}
}
},
"name": "Тверская улица, 6с1",
"description": "Москва, Россия",
"boundedBy": {
"Envelope": {
"lowerCorner": "37.607242 55.757926",
"upperCorner": "37.615452 55.762556"
}
},
"Point": {
"pos": "37.611347 55.760241"
}
}
}
]
}
}
}
{
"response": {
"GeoObjectCollection": {
"metaDataProperty": {
"GeocoderResponseMetaData": {
"request": "Киевская обл. , г. Киев, ул. Крещатик, дом 50, кв. 8",
"results": "10",
"found": "2"
}
},
"featureMember": [
{
"GeoObject": {
"metaDataProperty": {
"GeocoderMetaData": {
"precision": "exact",
"text": "Украина, Киев, улица Крещатик, 50",
"kind": "house",
"Address": {
"country_code": "UA",
"formatted": "Украина, Киев, улица Крещатик, 50",
"Components": [
{
"kind": "country",
"name": "Украина"
},
{
"kind": "province",
"name": "Киев"
},
{
"kind": "locality",
"name": "Киев"
},
{
"kind": "street",
"name": "улица Крещатик"
},
{
"kind": "house",
"name": "50"
}
]
},
"AddressDetails": {
"Country": {
"AddressLine": "Украина, Киев, улица Крещатик, 50",
"CountryNameCode": "UA",
"CountryName": "Украина",
"AdministrativeArea": {
"AdministrativeAreaName": "Киев",
"Locality": {
"LocalityName": "Киев",
"Thoroughfare": {
"ThoroughfareName": "улица Крещатик",
"Premise": {
"PremiseNumber": "50"
}
}
}
}
}
}
}
},
"name": "улица Крещатик, 50",
"description": "Киев, Украина",
"boundedBy": {
"Envelope": {
"lowerCorner": "30.516022 50.440632",
"upperCorner": "30.524232 50.445875"
}
},
"Point": {
"pos": "30.520127 50.443254"
}
}
},
{
"GeoObject": {
"metaDataProperty": {
"GeocoderMetaData": {
"precision": "other",
"text": "Украина, Киевская область",
"kind": "province",
"Address": {
"country_code": "UA",
"formatted": "Украина, Киевская область",
"Components": [
{
"kind": "country",
"name": "Украина"
},
{
"kind": "province",
"name": "Киевская область"
}
]
},
"AddressDetails": {
"Country": {
"AddressLine": "Украина, Киевская область",
"CountryNameCode": "UA",
"CountryName": "Украина",
"AdministrativeArea": {
"AdministrativeAreaName": "Киевская область"
}
}
}
}
},
"name": "Киевская область",
"description": "Украина",
"boundedBy": {
"Envelope": {
"lowerCorner": "29.266411 49.179114",
"upperCorner": "32.161466 51.554013"
}
},
"Point": {
"pos": "30.456149 50.29807"
}
}
}
]
}
}
}