Python Forum
Adding adjacent parts of a list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding adjacent parts of a list
#1
Hey all!

So I am trying to get a program that adds adjacent list values together and then finds the greatest amongst them...
--list_one = [ 3, 6, 2, 8, 3 ]

So, the next step should evaluate to something like this :
--9 8 10 11

and then from there select the greatest value so ultimately:
--11

I hope this makes sense to everyone... I spent time trying to figure it out ... but then I realize I know very little about the functions and powers of python... So I need to keep submitting and putting a pin in the ones that are most helpful.Thank you very much like always!!

# LONG LIVE PYTHON
Reply
#2
What have you tried, and how exactly is it failing?
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Adding values with reduce() function from the list of tuples kinimod 10 2,636 Jan-24-2023, 08:22 AM
Last Post: perfringo
  Adding a list to Python Emailing Script Cknutson575 4 2,304 Feb-18-2021, 09:13 AM
Last Post: buran
  Determine number of all the immediately adjacent points in python zackk 1 1,858 Feb-06-2021, 09:23 AM
Last Post: zackk
  adding numbers in a list Nickd12 2 2,190 Jan-15-2021, 12:46 PM
Last Post: Serafim
  Adding List Element if Second part of the List Elements are the Same quest_ 3 2,437 Nov-25-2020, 04:33 PM
Last Post: bowlofred
  Append only adding the same list again and again viraj1123 4 2,038 Jun-17-2020, 07:26 AM
Last Post: viraj1123
  adding elements to a list that are more than a specific number Olavv 2 2,196 Mar-19-2020, 06:05 PM
Last Post: Olavv
  Adding elements to a list by number Olavv 4 2,936 Mar-08-2020, 11:16 AM
Last Post: ndc85430
  Adding items in a list (using loops?) Seneca260 6 2,748 Nov-22-2019, 11:34 AM
Last Post: Seneca260
  Converting parts of a list to int for sorting menator01 2 2,223 Nov-03-2019, 03:00 PM
Last Post: menator01

Forum Jump:

User Panel Messages

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