Creating an Array: Difference between revisions

formatting
(Creating lists and tuples from iteratables, cleaner explenations)
(formatting)
Line 373:
>>> list({'a': 1, 'b': 2, 'c': 3})
['a', 'c', 'b']
</pre>
>>> open('file', 'w').write('1\n2\n3\n')
>>> list(open('file'))
['1\n', '2\n', '3\n']
</pre>
 
==[[Ruby]]==
Anonymous user