# Creating sublists [duplicate]

I got this example in Mathematica references.

v = ToExpression["a" <> ToString[#]] & /@ Range[1,44]


Could someone explain to me the function of the term #? There is another way to get the same result?

And how could I relate v list with another list of 44 lists in it one by one?

lists={{3},{54},...,{46}}


The result would be something like:

a1=3
a2=54
...
a44=46


## marked as duplicate by MarcoB, m_goldberg, user9660, Kuba♦, Mr.Wizard♦ list-manipulation StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 21 '16 at 12:06

• Funtion and Slot. – Wjx Jun 21 '16 at 1:07
• represents the first argument supplied to a pure function – Young Jun 21 '16 at 1:21
• Things are not so easy when a1, a2... have OwnValues, why not use a[1]? – happy fish Jun 21 '16 at 2:22
• For #, search this answer. – Michael E2 Jun 21 '16 at 2:24
• Also related: (94294) – Michael E2 Jun 21 '16 at 2:26

Does it help?

a = RandomInteger[9, 44]
(Evaluate[Symbol["a" <> ToString[#]]] = a[[#]]) & /@ Range[44]

{a[[3]], a3}
{a[[11]], a11}


{0, 9, 7, 5, 9, 6, 6, 6, 1, 4, 4, 9, 3, 6, 1, 8, 2, 9, 8, 6, 1, 1, 1, 4, 7, 9, 6, 9, 0, 5, 7, 5, 8, 2, 4, 1, 1, 4, 3, 0, 4, 7, 6, 0}

{7, 7}

{4, 4}

• I don't get it. Is it not working? Can you put a small example of your input and output. – Sumit Jun 22 '16 at 8:16
• Sorry, my bad. Check the modified answer. – Sumit Jun 22 '16 at 10:06