package main
import \"fmt\"
func main(){
sample := map[string]string{
\"key1\":\"value1\",
\"key2\":\"value2\",
\"key3\":\"value3\",
}
for
Python does not guarantee the order of iteration, but it does guarantee that the order will remain stable so long as you do not modify the dictionary between calls:
If items(), keys(), values(), iteritems(), iterkeys(), and itervalues() are
called with no intervening modifications to the dictionary, the lists will
directly correspond.
Go does not guarantee either. It looks from your example as though the order in Go may be stable and only the starting point varies, but as nothing is guaranteed don't depend on it.