Skip to main content
1 of 2
LeafGlowPath
  • 1.5k
  • 8
  • 11

Simple way to convert expression to a list?

I know that I can convert an expression to list by

List @@ expr

But this does not work if expr contains only one term, e.g.,

List @@ 1

will give you 1 instead of {1}. Of course I can check the length of expr first. But I wonder if there is simpler way to do this.

LeafGlowPath
  • 1.5k
  • 8
  • 11