Python Forum
Detect if an integer ends in 0 or 5
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Detect if an integer ends in 0 or 5
#1
I am new to Python.  How do I determine if a variable (it will always be a two or three digit integer) ends either in a '0' or a '5'.  If it does, I want to print it (I know how to do the print part).

thanks for looking
Reply


Messages In This Thread
Detect if an integer ends in 0 or 5 - by birdieman - Jan-11-2017, 09:05 PM
RE: Detect if an integer ends in 0 or 5 - by buran - Jan-11-2017, 09:21 PM
RE: Detect if an integer ends in 0 or 5 - by buran - Jan-11-2017, 09:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pywin32: Outlook connection ends with 'operation aborted' on one machine tstone 0 2,375 May-03-2022, 04:29 AM
Last Post: tstone
  Regex: a string does not starts and ends with the same character Melcu54 5 2,416 Jul-04-2021, 07:51 PM
Last Post: Melcu54
  threadlocals are garbage collected before thread ends akv1597 0 1,796 Mar-09-2021, 12:13 PM
Last Post: akv1597
  Running a few lines of code as soon as my timer ends nethatar 3 2,398 Feb-26-2021, 01:02 PM
Last Post: jefsummers
  Writing to file ends incorrectly project_science 4 2,685 Jan-06-2021, 06:39 PM
Last Post: bowlofred
  Keep Application running after Python script ends PEGylated_User 0 1,973 Nov-12-2020, 03:27 PM
Last Post: PEGylated_User
  Script ends, does not start again phanegem 8 5,075 Mar-30-2017, 07:36 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