From 69ae630ee9b4e2dff192841a2f1043fc59e9bb90 Mon Sep 17 00:00:00 2001 From: rsirres Date: Thu, 29 Dec 2016 15:27:31 +0100 Subject: [PATCH] Fix format --- Nim-for-Python-Programmers.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Nim-for-Python-Programmers.md b/Nim-for-Python-Programmers.md index e82f784..7494e97 100644 --- a/Nim-for-Python-Programmers.md +++ b/Nim-for-Python-Programmers.md @@ -168,16 +168,6 @@ Use [Nim sequences](http://nim-lang.org/docs/tut1.html#advanced-types-sequences) Nim arrays and sequences can hold only items of the same type. -### Python dictionaries - -``` Nim -import tables - -var a = {"hallo": "World", "Key2": "Value2"}.newTable - -for key, value in a: - echo key, " " ,value -``` #### List Comprehensions ``` @@ -192,6 +182,17 @@ echo lc[ y | ( y <- x, y > 5 ), int ] echo lc[ y*2 | ( y <- x ), int ] ``` +### Python dictionaries + +``` Nim +import tables + +var a = {"hallo": "World", "Key2": "Value2"}.newTable + +for key, value in a: + echo key, " " ,value +``` + ### Python sets Python sets are not like [Nim set type](http://nim-lang.org/docs/manual.html#types-set-type).