Skip to content

Commit 65429e5

Browse files
committed
updates
1 parent 6c29d61 commit 65429e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def fib(n):
103103
return fib(n-1) + fib(n-2)
104104
```
105105

106-
Although you can write this code in many ways, both of these methods are *true* to the language. In other words, the Ruby example is very Ruby-ish while the Python example is very Pythonic. Can you read the Ruby code? It may be more elegant, since it is on one line, but it's very hard to read. Meanwhile, it's easy to follow the Python code, right? You of course can write code anyway you want. It's advisable to write Ruby code, when beginning, in a more Pythonic way - which simply means making it more readable:
106+
Although you can write this code in many ways, both of these methods are *true* to the language. In other words, the Ruby example is very Ruby-ish while the Python example is very Pythonic. Can you read the Ruby code? It may be more elegant but it's a bit harder to read. Meanwhile, it's easy to follow the Python code, right? You of course can write code anyway you want. It's advisable to write Ruby code, when beginning, in a more Pythonic way - which simply means making it more readable:
107107

108108
```ruby
109109
def fib(n)

0 commit comments

Comments
 (0)