为什么这不起作用
Name=input
Class=input
(Name+Class)=[]
Time=input
(Name+Class).append(Time)
我是python的新手,所以我还在学习基础知识 对于这段代码,我希望每次输入名称和类的不同数据时创建一个新列表
答案 0 :(得分:0)
好吧,我强烈建议您浏览tutorial。无论如何,你的代码片段可能会像这样:
{
"resourceType": "CarePlan",
...,
"activity": [
{
"actionResulting": [
{
"reference": "Questionnaire/copd-form"
}
]
"detail": {
"category": {
"coding": [
{
"system": "http://hl7.org/fhir/care-plan-activity-category",
"code": "observation"
}
]
},
"code": {
"text": "A code for capturing COPD subjective input from patient?"
},
"prohibited": false,
"scheduledTiming": {
"repeat": {
"frequency": 1,
"period": 1,
"periodUnits": "d"
}
},
"performer": [
{
"reference": "Patient/3183"
}
],
"description": "Daily COPD form"
}
}
}