Python Forum
Counting numbers in other lines
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Counting numbers in other lines
#6
(Dec-11-2020, 02:54 PM)deanhystad Wrote: Why are you using find(':')? You know where ':' is. You have the number string, all you have to do is convert to a number and add them together. Is it the adding together that you are having a problem with?

I am going to read off a list of numbers and I need you to tell me the total. You do not have a pencil and paper to write the numbers down. How would you do that?
at the beginning of the program gives the "user" the ability to type in the name of the file that wants to read the search for the dot is to open this file without any extension errors.
The whole text file contains a lot of lines and I didn't know how to add numbers in different places of this file hence my question.
Reply


Messages In This Thread
Counting numbers in other lines - by LewAlbert - Dec-11-2020, 11:50 AM
RE: Counting numbers in other lines - by LewAlbert - Dec-11-2020, 12:36 PM
RE: Counting numbers in other lines - by deanhystad - Dec-11-2020, 02:54 PM
RE: Counting numbers in other lines - by LewAlbert - Dec-12-2020, 06:09 PM
RE: Counting numbers in other lines - by perfringo - Dec-11-2020, 04:31 PM
RE: Counting numbers in other lines - by deanhystad - Dec-12-2020, 07:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Random Generator: From Word to Numbers, from Numbers to n possibles Words Yamiyozx 2 1,522 Jan-02-2023, 05:08 PM
Last Post: deanhystad
  Convert list of numbers to string of numbers kam_uk 5 3,133 Nov-21-2020, 03:10 PM
Last Post: deanhystad
  Regular Expressions in Files (find all phone numbers and credit card numbers) Amirsalar 2 4,188 Dec-05-2017, 09:48 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

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