我有一个简单的例子:
test = '{ "text": "\"test\""}'
Run Code Online (Sandbox Code Playgroud)
这是一个有效的json(参见http://jsonlint.com/).
但是simplejson.loads(test)返回错误:
ValueError: Expecting , delimiter: line 1 column 12 (char 12)
Run Code Online (Sandbox Code Playgroud)
为什么?
我有2个清单:
{
'ip': ['10.100.1.38', '10.100.1.39', '10.100.1.35'],
'port': ['3380', '3381', '3382', '3383', '3384', '3385', '3386', '3387']
}
Run Code Online (Sandbox Code Playgroud)
我想得到清单:
[
"10.100.1.38::3380"... "10.100.1.38::3387",
"10.100.1.39::3380"... "10.100.1.39::3387",
"10.100.1.35::3380"... "10.100.1.38::3387"
]
Run Code Online (Sandbox Code Playgroud) 我有字典:
{ "key1" : 1, "key2" : 2, ...., "key100" : 100 }
Run Code Online (Sandbox Code Playgroud)
我想通过对这个字典中的值进行排序来获取列表前 5 个键:
[ "key100", "key99",.. "key95" ]
Run Code Online (Sandbox Code Playgroud)
怎么做 ?
可以将Oracle SQL/PLSQL中的所有日期都作为表获取吗?
从bla-bla-bla DUAL中选择*
结果:
1 rec: 01.01.2012
2 rec: 02.01.2012
3 rec: 03.01.2012
...
4 rec: 31.01.2012
Run Code Online (Sandbox Code Playgroud)
?