我有一个小需求,我想将存储在变量中的时间戳转换doc.creation_time为格式[year,month,day]
例子:
doc.creation_time=1537492812
这应该转换为[2018,38,Fri]
有人可以帮忙吗
I have a dictionary & a list as follows.
>>> new_coins
{'main': '100', 'single': '10'}
>>> get_snip_priority('prod-oregon')
['prod-singapore', 'prod-delhi']
Run Code Online (Sandbox Code Playgroud)
I need the best efficient way to create a dictionary using the above 2 data structs as follows:
{
main : {
'prod-singapore': 100, # 100 is the value of main
'prod-delhi': 100 },
single: {
'prod-singapore': 10, # 10 is the value of static
'prod-delhi': 10 },
Run Code Online (Sandbox Code Playgroud)
can some one help