diff --git a/Nim-for-Python-Programmers.md b/Nim-for-Python-Programmers.md index 1c59b31..b2fb875 100644 --- a/Nim-for-Python-Programmers.md +++ b/Nim-for-Python-Programmers.md @@ -147,3 +147,10 @@ Use [Tables](http://nim-lang.org/tables.html) See [this](http://rosettacode.org/wiki/Abstract_type#Nim) +### Ternary operator + +``` Nim +var is_happy = if has_cat(): "quite" else: "not much" +``` + +