<div dir="auto"><div>Of course not! The request was for something that worked on Python *collections*. If the OP wanted something that worked on iterables in general, we'd need a different function with different behavior.</div><div dir="auto"><br></div><div dir="auto">Of course, it also doesn't work on dictionaries. I don't really have any ideas what the desired behavior might be for dicts. Various things are conceivable, none obvious. But it's fine on lists, sets, tuples, deques, and some other things that are roughly sequence-like.</div><div dir="auto"><br></div><div dir="auto"><br><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Tue, Jan 29, 2019, 10:38 PM Robert Vanden Eynde <<a href="mailto:robertve92@gmail.com">robertve92@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><div class="gmail_quote"><div dir="ltr"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>stringify = lambda it: type(it)(map(str, it))</div><div dir="auto"></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">stringify(range(5)) doesn't work ^^</div><div dir="auto"><br></div><div dir="auto">One advantage or having a standard function is that it has been designed by a lot of persons for all possible use cases :)</div></div>
</blockquote></div></div></div>