Python Forum
Newbie question for sum the specific element in named tuple
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie question for sum the specific element in named tuple
#2
total_age = sum(person.Age for person in people)
Reply


Messages In This Thread
RE: Newbie question for sum the specific element in named tuple - by buran - Dec-12-2017, 07:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Searche each element of each tuple based 3 numbes zinho 8 866 Dec-11-2023, 05:14 PM
Last Post: zinho
  How is pandas modifying all rows in an assignment - python-newbie question markm74 1 697 Nov-28-2023, 10:36 PM
Last Post: deanhystad
  newbie question - can't make code work tronic72 2 689 Oct-22-2023, 09:08 PM
Last Post: tronic72
  Newbie question about switching between files - Python/Pycharm Busby222 3 596 Oct-15-2023, 03:16 PM
Last Post: deanhystad
  Newbie.... run for cover. OpenCV question Stevolution2023 2 974 Apr-12-2023, 12:57 PM
Last Post: Stevolution2023
  numpy newbie question bcwilly_ca 4 1,186 Feb-10-2023, 05:55 PM
Last Post: jefsummers
  search a list or tuple for a specific type ot class Skaperen 8 1,926 Jul-22-2022, 10:29 PM
Last Post: Skaperen
  convert a named tuple to a dictionary Skaperen 13 3,531 Mar-31-2022, 07:13 PM
Last Post: Skaperen
  myList.insert(index, element) question ChrisF 1 1,645 Aug-27-2021, 03:49 PM
Last Post: bowlofred
  Question from complete python's newbie Davicom 3 2,369 Jun-09-2021, 06:09 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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