Why does collections.namedtuple() accept a comma or whitespace separated string as well as a list? Should I do the same?

后端 未结 0 1609
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 18:46

I saw this code and it was astonished that it worked!

from collections import namedtuple
MyStruct = namedtuple("MyStruct", "field1 field2 field         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题