DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Vishal Dhapola
Vishal Dhapola

Posted on

Python vs GO

Go cheatsheet- https://devhints.io/go
1.
For loop in Go

package main
import "fmt"
func main() {
   even_numbers := []int{}
   for i := 1; i <= 10; i++ {
      if i%2 == 0 {
         even_numbers = append(even_numbers, i)
      }
    }
   fmt.Println(even_numbers)
}
Enter fullscreen mode Exit fullscreen mode

For loop in Python

even_numbers = []
for number in range(10):
   if number % 2 == 0:
      even_numbers.append(number)
print(even_numbers)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Timeless DEV post...

How to write a kickass README

Arguably the single most important piece of documentation for any open source project is the README. A good README not only informs people what the project does and who it is for but also how they use and contribute to it.

If you write a README without sufficient explanation of what your project does or how people can use it then it pretty much defeats the purpose of being open source as other developers are less likely to engage with or contribute towards it.