Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
If else if in 2 ways
#python 3.5.2 acceptedyes_list = ["yes", "yeah", "Yes" , "Yeah"] acceptedno_list = ["No", "no"] QuoteReplay_str = "yes" if QuoteReplay_str in acceptedyes_list: print("You accepted") elif QuoteReplay_str in acceptedno_list: print("You did not accept") else: print("You entered wrong choice") message = (lambda s:"You accepted" if s in acceptedyes_list else "You did not accept" if s in acceptedno_list else "You entered wrong choice")(QuoteReplay_str) print (message)
run
|
edit
|
history
|
help
0
Python mehrfachvererbung
Partition To 2 Equal Sum Subsets From An Array of Integers
Z Pattern ( first python program)
pip install pyowm==2.7.1
Infinite Fibonacci generator
shuru2
Ej2_python_204676887
Find numbers with given sum of digits
My cousin asked for this will never forgive her
two-digits-puzzle