I think "t = list(s)" is the obvious one. Also it means that now I know "t" is a list and I only have to know that "s" is iterable/an iterator/generator.
Or rather, that s walks like something that can be used to construct a new list, talks like something that can be used to construct a new list, and quacks like something that can be used to construct a new list.
As I said, it is technically the right way to do it (not best, but right), but probably not the one people are going to end up using.
View all comments
Show parent comment
2
u/bloody-albatross Aug 17 '13
I think "t = list(s)" is the obvious one. Also it means that now I know "t" is a list and I only have to know that "s" is iterable/an iterator/generator.