Python Forum
stupid > comparison question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
stupid > comparison question
#1
I have a list with a value of 4 at index 2. I compare this with a value of 200 to see if it is greater ... and strangely it says it is:

eg
print deltaList[2], thr2nd, deltaList[2] > thr2nd
I get this output: 4 200 True

This is obviously wrong but what am I doing wrong ?

Regards Undecided
Reply
#2
There are no stupid questions, knowing that a question has to be asked shows intelligence!
add:
print('datalist[2]: {}, thr2nd: {}'.format(datalist[2], thr2nd))
To be really sure they contain what you think they contain.
Reply
#3
oops it was a string - stupid 8 year olds mistake !
thanks anyway
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reverse list items in a stupid way pyth0n123 4 2,637 Jul-28-2019, 02:52 PM
Last Post: pyth0n123
  how do you use stupid ffmpeg ineedastupidusername 0 4,304 Nov-10-2017, 05:38 AM
Last Post: ineedastupidusername
  Stupid question abradler 3 3,656 Apr-13-2017, 07:10 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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