ListInvalidSyntax

Asked 2 years ago, Updated 2 years ago, 20 views

k=[
Hakgua = ["Chemical name", "Chemical name", "Chemical name", "Urban engineering", "Urban engineering"]      
hakbun= [202001, 202002, 202003, 202011, 202012]
irum = ['aaa', 'bbb', 'ccc', 'ddd', 'eee']
chongjum= [98, 91, 88, 82, 77]
peongjum= ['A', 'A', 'B', 'B' 'C']
]

It keeps saying Invaluated Syntax. What's the problem?

python

2022-09-20 22:18

1 Answers

 hakgua = ["Chinese name", "Chinese name", "Urban engineering", "Urban engineering"]      
hakbun= [202001, 202002, 202003, 202011, 202012]
irum = ['aaa', 'bbb', 'ccc', 'ddd', 'eee']
chongjum= [98, 91, 88, 82, 77]
peongjum= ['A', 'A', 'B', 'B' 'C']

k=[hakgua, hakbun, irum, chongjum, peongjum]

Only expressions (values) can be included in the [ ] used to create the list.

If a sentence (allocation statement, etc.) goes in, it's an Invaluated Syntax...


2022-09-20 22:18

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.