Python Lists -Syntax for '[' -
i need declare values in list. values looks this:
["compute","controller"], ["compute"] ,["controller"] i know list syntax in python
example = [] i not sure how include square brackets , double quotes in list. please help.
i tried following:
cls.node = ["\["compute"\]","\["controller"\]"] cls.node = ["[\"compute\"]","[\"controller\"]"] both did not work.
i think mean list not dictionary because syntax of list:
you can using following format '"hello"':
cls.node = ['["compute"]','["controller"]'] cls.node = ['["compute"]','["controller"]'] demo:
s = ['["hello"]', '["world"]'] in s: print [output] ["hello"] ["world"]
Comments
Post a Comment