Python Forum
if condition not behaving as expected
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if condition not behaving as expected
#11
Hello deanhystad,

I have changed my code according your remarks as follows :

        if PointFound_17 == (True,):
            print('eureka')
This is now giving me the desired output :

region 1 --> (False,)
region 2 --> (False,)
region 3 --> (True,)
eureka
region 4 --> (False,)
region 5 --> (False,)
region 6 --> (False,)
region 7 --> (False,)

I am used to .NET where this type of behaviour for boolean values is somewhat different.

Problem solved.

Thanks.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ConfigParser(dict_type=) not behaving as expected malonn 5 3,227 Sep-08-2022, 08:42 AM
Last Post: malonn
  Two loops behaving differently DavidTheGrockle 5 2,454 Dec-27-2020, 03:56 AM
Last Post: deanhystad
  else condition not called when if condition is false Sandz1286 10 5,739 Jun-05-2020, 05:01 PM
Last Post: ebolisa
  [HELP] Nested conditional? double condition followed by another condition. penahuse 25 7,704 Jun-01-2020, 06:00 PM
Last Post: penahuse
  Requests not behaving... PythonLamer 1 4,754 Dec-01-2017, 06:45 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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