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
pythonic way (V2)
nameit01.py
afw
Change Binary into Decimal
Me good good
HW Descending order Insertion Sort
Binary Search
filtering python3
default argument
http