Creating a list of symbols using a comprehension

You could do

[Symbol("M", i) for i in 1:10]

or

Symbol.("M", 1:10)
2 Likes