What are differences between ruby and python?
Answer / Gagan Gunjan
Ruby and Python have several differences: Ruby is more flexible in terms of syntax, using whitespace to define structure, while Python uses indentation. Ruby is also dynamically typed (with optional type checking), and it supports multiple inheritance, while Python is statically typed and does not support multiple inheritance. Lastly, Ruby emphasizes metaprogramming and has a rich introspection API.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is ruby whitespace-dependent?
Tell me how you can create a controller for subject?
In Ruby code, often it is observed that coder uses a short hand form of using an expression like array.map(&:method_name) instead of array.map { |element| element.method_name }. How this trick actually works?
How is visibility of methods changed in ruby?
Explain some differences between ruby and python.
Describe the environment variables present in Ruby?
Do you know what is the defined operator?
What is the pattern matching operator in ruby?
Explain break statement in Ruby?
How do the following methods differ: @my_string.strip and @my_string.strip! ?
Explain Ruby exceptions?
Do you know about dig, float and max?