Quantcast
Viewing all articles
Browse latest Browse all 186

Using List to create lists of strings: difference(s) between two one-line codes?

In the Virtual Book of Mathematica, there is a simple example to show how to create lists of strings by List:

List[{"a", "b", "c"}, {"you", "are", "good"}]

here " " indicates these strings, which is easy to understand.

However, if we use

List[{a, b, c}, {you, are, good}]

instead, we can find that both codes give the same result:

{{a, b, c}, {you, are, good}}

So my questions:

  1. Whether or not the two codes are different with respect to the output of their results. If yes, what is(are) the difference(s)?

  2. Whether or not the two codes are exactly the same in the context of a program?

Thank you in advance.


Viewing all articles
Browse latest Browse all 186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>