Maybe it's worth putting up an answer that addresses the "naming pattern" part mentioned in the question. As I mentioned in my comment, I don't see why you'd want to store the parts individually in separate variables, so I will focus only on a function that allows you to use exactly the variable names that you want, but without assigning any values to them. That potentially saves a lot of memory.
Then the question reduces to extracting the correct parts of a big list, given a symbol with the naming convention you required. Here is the answer to that question:
t = RandomWord["CommonWords", 100];
u = RomanNumeral[Range[100]];
getNamed[s_Symbol] := Module[{name = SymbolName[s]},
Part[Symbol @@ StringCases[name, LetterCharacter .., 1],
Apply[Span, ToExpression@StringCases[name, NumberString]]]]
getNamed[t1To10]
(*
==> {"holler", "perturbation", "inform", "grind", "unstudied", \
"knucklehead", "trefoil", "uracil", "carhop", "deceptively"}
*)
getNamed[t11To20]
(*
==> {"labeled", "forswearing", "laurels", "welt", "foundling", \
"reservation", "popularize", "foolishly", "dinette", "warble"}
*)
getNamed[u31To40]
(*
==> {"XXXI", "XXXII", "XXXIII", "XXXIV", "XXXV", "XXXVI", \
"XXXVII", "XXXVIII", "XXXIX", "XL"}
*)
The main ingredient in the function getName
is SymbolName
, which converts the input to a string on which I then do pattern matching to extract the name of the large list and the parts.
Span[]
then? $\endgroup$Partition
overSpan
when I was first writing the question, but I settled on one and figured someone would point out a better/easier option. I've edited my question to include the latter. $\endgroup$l = RandomReal[{0, 1}, 10^6]; myP[n_Integer] := l[[10 (n - 1) + 1 ;; 10 n]]; Print[myP[1], myP[10^5]]
$\endgroup$12 326
, and the lists are composed of text strings - some lengthier than others - that I'm supposed to test in a search engine. The segmentation of the megalist was intended to make it easier for me to keep track of which inputs have been tested. $\endgroup$