为什么这段代码不起作用。它似乎无法分配给操作员错误

时间:2016-02-28 18:46:44

标签: python-3.x

为什么这不起作用

Name=input
Class=input
(Name+Class)=[]
Time=input
(Name+Class).append(Time)

我是python的新手,所以我还在学习基础知识 对于这段代码,我希望每次输入名称和类的不同数据时创建一个新列表

1 个答案:

答案 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"
      }
    }
}