Python Forum
Help Me With This Issue Please
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Me With This Issue Please
#5
Instead of this monster-line:

if Command_calculator == "calculator" or Command_calculator == "Calculator" or Command_calculator == "calc" or Command_calculator == "Calc" or Command_calculator == "Cal-cu-la-tor"
One can write more readable:

if Command_calculator.lower() in ['calculator', 'calc', 'cal-cu-la-tor']:
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
Help Me With This Issue Please - by 00banyaszo00 - Apr-03-2020, 01:18 AM
RE: Help Me With This Issue Please - by ndc85430 - Apr-03-2020, 03:27 AM
RE: Help Me With This Issue Please - by perfringo - Apr-03-2020, 12:40 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020