Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Python3 - select fruits
#python 3.5.2 table = [ {'fruit': 'apple'}, {'fruit': 'orange'}, {'fruit': 'kiwi'}, {'fruit': 'banana'} ] fruits = set((item["fruit"] for item in table)) try: user_input = "" while user_input != 'exit': user_input = input('> ') words = user_input.split() if words and words[0] == "select": for word in words[1:]: if word in fruits: print(word) except Exception as e: print(e)
run
|
edit
|
history
|
help
0
adda
Pierwiastkowanie
.....✓[Guess the number]®®®®®®®•$$$$✓.....
guesssss
@godel godel
Homework exercise
Infinite Fibonacci generator
kaam ki chiz
teretere
Два шарика в квадрате