Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simple syntax question
#7
(Mar-10-2019, 11:58 PM)Yoriz Wrote: You are missing that the first argument is true.
Any string value other than "" is evaluated to True.

Okay I get it now, thanks!

Clear example of what's going on for anyone else:

var = 10
var == True
Evaluates false, because 10 is not the same as True, and like the thread above noted, any non-empty string will be changed to True.
Reply


Messages In This Thread
simple syntax question - by speedskis777 - Mar-10-2019, 02:48 PM
RE: simple syntax question - by Archie - Mar-10-2019, 04:29 PM
RE: simple syntax question - by speedskis777 - Mar-10-2019, 04:59 PM
RE: simple syntax question - by Yoriz - Mar-10-2019, 05:34 PM
RE: simple syntax question - by speedskis777 - Mar-10-2019, 11:45 PM
RE: simple syntax question - by Yoriz - Mar-10-2019, 11:58 PM
RE: simple syntax question - by speedskis777 - Mar-11-2019, 12:11 AM
RE: simple syntax question - by snippsat - Mar-11-2019, 02:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Very Beginner question on simple variables Harvy 1 394 Apr-12-2024, 12:03 AM
Last Post: deanhystad
  Simple Question - ' defined as "a". ?' Ryan012 10 1,934 May-27-2023, 06:03 PM
Last Post: Ryan012
  syntax error question - string mgallotti 5 1,503 Feb-03-2023, 05:10 PM
Last Post: mgallotti
  Very simple question about filenames and backslashes! garynewport 4 2,181 Jan-17-2023, 05:02 AM
Last Post: deanhystad
  Python Tkinter Simple Multithreading Question AaronCatolico1 5 1,803 Dec-14-2022, 11:35 PM
Last Post: deanhystad
  A simple "If...Else" question from a beginner Serena2022 6 1,897 Jul-11-2022, 05:59 AM
Last Post: Serena2022
  Simple syntax to asynchronously get access to MODBUS register orion67 1 2,981 Jan-22-2022, 12:40 PM
Last Post: orion67
  Simple arithmetic question ebolisa 5 2,200 Dec-15-2021, 04:56 PM
Last Post: deanhystad
  Simple code question about lambda and tuples JasPyt 7 3,611 Oct-04-2021, 05:18 PM
Last Post: snippsat
Big Grin question about simple algorithm to my problem jamie_01 1 1,768 Oct-04-2021, 11:55 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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