Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 186

Understanding double square bracket [[1]] for extracting portion of a list

$
0
0
StringSplit[stringsample,{"."}][[1]] 

The double square bracket syntax appears not that intuitive with otherwise the usual way which is putting one function above the other.

If I understand correctly, the output of StringSplit function which is a list is being used by [[1]] to show just the first element of the list. What appears strange is the syntax.


Viewing all articles
Browse latest Browse all 186

Trending Articles



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