Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # string_index.py
- LLL = ['zero', 'one', 'two', 'three', 'four', 'five']
- def fn(s): return LLL.index(s) if s in LLL else '!!! *'+s+'* Not Found In List'
- print(fn("three"))
- print(fn("ten"))
- print(fn("two"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement