Creating an Array: Difference between revisions
Content deleted Content added
tuples |
No edit summary |
||
Line 358:
zeros = (0,) * 10
anything = (1, 'foo', 2.57, None, zeros)
==[[Ruby]]==
[[Category:Ruby]]
I've used the same examples as the Python-example above.
empty = []
#or:
empty = Array.new
numbers = [1, 2, 3, 4, 5]
zeros = [0] * 10
anything = [1, 'foo', 2.57, zeros]
==[[Toka]]==
|