Ruby methods equivalent of "if a in list" in python?

Viewed 11653

In python I can use this to check if the element in list a:

>>> a = range(10)
>>> 5 in a
True
>>> 16 in a
False

How this can be done in Ruby?

2 Answers
Related