Hi there, I am interested in phone selection by using if..else statement. so after viewing the phone specification we can select the phone and purchase that. so do you have python sample codes for that? a rough idea is enough. Thank you. and python is really interesting.
alagez
0
Newbie Poster
Recommended Answers
Jump to Postsigh I must have been tired, or else had an attack of the dumba-- this morning. You can replace
for choice in option_list: if choice == option: option_list[choice]()
with just
option_list[option]()
There's no need to loop on it at all. …
All 3 Replies
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
alagez
0
Newbie Poster
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.