How to read args from environment

Hi, I am trying to write a simple program where I would read args from terminal and print them. I found this function in the documentation but well...there is no documentation https://docs.modular.com/mojo/stdlib/sys/arg/argv I am wondering how is people learning to code in mojo considering documentation is at this level
argv | Modular Docs
argv() -> VariadicList[StringRef]
2 Replies
Ehsan M. Kermani (Modular)
GitHub
devrel-extras/blogs/2405-max-graph-api-tutorial/mnist.mojo at 456c3...
Contains supporting materials for developer relations blog posts, videos, and workshops - modularml/devrel-extras
Michael K
Michael K8mo ago
Here is an example using it. The gist is that argv() returns a VariadicList so you can index into it, iterate over it, or get the length to work with the arguments. The docs on VariadicList are here.
GitHub
llama2.mojo/llama2.mojo at master · tairov/llama2.mojo
Inference Llama 2 in one file of pure 🔥. Contribute to tairov/llama2.mojo development by creating an account on GitHub.
Want results from more Discord servers?
Add your server