diff --git a/Nim-for-Python-Programmers.md b/Nim-for-Python-Programmers.md index adeb987..ef4f173 100644 --- a/Nim-for-Python-Programmers.md +++ b/Nim-for-Python-Programmers.md @@ -209,4 +209,9 @@ See [this](http://rosettacode.org/wiki/Abstract_type#Nim) var is_happy = if has_cat(): "quite" else: "not much" ``` +### Reading files line by line +``` Nim +for line in lines "yourfile.txt": + echo line +```