Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Hates me
#3
In your json, inbound and outbound are boolean, not strings. In your program you compare data["inbound"] to str "true". This should be:
if data['inbound']:
    print(data['url'])
You could write it this way:
if data['inbound'] == True:
    print(data['url'])
But it is nonsensical testing if the value of a boolean is True.
Reply


Messages In This Thread
Python Hates me - by quarinteen - Aug-12-2022, 02:08 PM
RE: Python Hates me - by rob101 - Aug-12-2022, 02:41 PM
RE: Python Hates me - by deanhystad - Aug-12-2022, 03:39 PM
RE: Python Hates me - by Gribouillis - Aug-12-2022, 09:47 PM
RE: Python Hates me - by Pedroski55 - Aug-13-2022, 04:38 AM

Forum Jump:

User Panel Messages

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