Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Lists can only contain strings, not other lists or dictionaries.

I don’t think this is true. None of the examples have lists containing non-string objects, but the documentation doesn’t seem to draw a distinction between lists and dictionaries wrt what can be placed in them.

(Both lists and dictionaries are initially described as only containing strings, and later this description is expanded to include nesting; this counterintuitive arrangement may explain the confusion.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: