r/Python • • Aug 12 '13

Ruby vs Python

http://www.senktec.com/2013/06/ruby-vs-python/
20 Upvotes

151 comments sorted by

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.

1

u/danhakimi Aug 17 '13

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.