Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mixed function
#2
You never convert your string to a number.
This makes no sense:
argstr.isdigit() > 100
argstr.isdigit() is just True or False (1 or 0). Not what you want.

You need to convert to int:
>>> string = "100"
>>> string.isdigit()
True
>>> number = int(string)
>>> number
100
Reply


Messages In This Thread
Mixed function - by Truman - Jan-19-2018, 11:25 PM
RE: Mixed function - by Mekire - Jan-19-2018, 11:32 PM
RE: Mixed function - by j.crater - Jan-19-2018, 11:32 PM
RE: Mixed function - by Truman - Jan-20-2018, 10:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sorting digits in a mixed string snorri 1 1,662 Apr-22-2020, 11:04 AM
Last Post: buran

Forum Jump:

User Panel Messages

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