-2
的字符串表示的子我有一個字符串如下,這是在JSON格式:紅寶石更換JSON
test_geometry_profile =
'{
"geometryProfile": {
"SPEEDSeedModel0.osm": {
"WWR": 0.5,
"Orientation": 0.0
},
"SPEEDSeedModel1.osm": {
"WWR": 0.6,
"Orientation": 0.0
}
}
}'
我想與'TestOSM_radiantDOAS.osm'
替換子SPEEDSeedModel1.osm
在此字符串。
我使用的代碼:
test_geometry_profile.sub("SPEEDSeedModel1.osm", 'TestOSM_radiantDOAS.osm')
然而,這無法工作。有什麼我在這裏失蹤?