Random Number functions

Hello, how do I modify this example to check the number and display the result?
Just like the Lotto function, in the example I use list to store the numbers.
Finally, I want to compare “myVar” with the numbers in the list.
How do I modify this? Thank you.

You can use myVar in mylist contains expression just like you use it in LuckyNum say myVar statement.