Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help to find a command
#7
(Feb-04-2019, 08:01 AM)andre_fermart Wrote: In the bellow example, the break will stop when the is a gap bigger than 10 between 2 link strength.
For example: [[77, 2], [16, 5], [36, 11], [7, 12], [93, 15], [42, 17], [82, 18], [33, 33], [79, 42], [94, 43]]
the result would be:
[[77, 2], [16, 5, 1], [36, 11], [7, 12, 1], [93, 15], [42, 17], [82, 18], [33, 33], [79, 42], [94, 43]]

What constitutes a gap? If I look at two list in bold I don't see any corresponding values where gap is bigger than ten (16 - 7 = 9; 12 - 5 = 7).

I do see 36 - 16 > 10. Does it mean that 1 should be appended to next element after the element where gap is larger than 10?

I still don't get this tension stuff. Why should you iterate below min value of strength? Nothing happens while doing it.

I also noticed that you sorted list. Does it mean that order is not important?
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
Help to find a command - by andre_fermart - Feb-02-2019, 08:06 AM
RE: Help to find a command - by stullis - Feb-02-2019, 04:15 PM
RE: Help to find a command - by perfringo - Feb-02-2019, 11:47 PM
RE: Help to find a command - by perfringo - Feb-03-2019, 12:51 PM
RE: Help to find a command - by andre_fermart - Feb-04-2019, 08:01 AM
RE: Help to find a command - by perfringo - Feb-04-2019, 09:49 AM
RE: Help to find a command - by andre_fermart - Feb-05-2019, 05:47 AM
RE: Help to find a command - by perfringo - Feb-05-2019, 09:01 AM
RE: Help to find a command - by perfringo - Feb-05-2019, 12:15 PM
RE: Help to find a command - by andre_fermart - Feb-12-2019, 02:34 AM

Forum Jump:

User Panel Messages

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