Python Forum
return next item each time a function is executed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
return next item each time a function is executed
#8
Maybe you are asking to get the next value each time the code is run not the function is called.
Each time the code is run it will return to its beginning state.
To alter the state of which item is selected you would need to store that state to be recalled each time the code is run.
User3000 likes this post
Reply


Messages In This Thread
RE: return next item each time a function is executed - by Yoriz - Aug-06-2023, 08:35 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  nested function return MHGhonaim 2 651 Oct-02-2023, 09:21 AM
Last Post: deanhystad
  How to not open the context menu if a mouse gesture is executed? MicheliBarcello 2 685 Aug-22-2023, 02:47 PM
Last Post: deanhystad
  code not working when executed from flask app ThomasDC 1 938 Jul-18-2023, 07:16 AM
Last Post: ThomasDC
  function return boolean based on GPIO pin reading caslor 2 1,225 Feb-04-2023, 12:30 PM
Last Post: caslor
  return vs. print in nested function example Mark17 4 1,800 Jan-04-2022, 06:02 PM
Last Post: jefsummers
  Remove an item from a list contained in another item in python CompleteNewb 19 5,900 Nov-11-2021, 06:43 AM
Last Post: Gribouillis
  time function does not work tester_V 4 3,107 Oct-17-2021, 05:48 PM
Last Post: tester_V
  How to invoke a function with return statement in list comprehension? maiya 4 2,919 Jul-17-2021, 04:30 PM
Last Post: maiya
  Function - Return multiple values tester_V 10 4,566 Jun-02-2021, 05:34 AM
Last Post: tester_V
  Why recursive function consumes more of processing time than loops? M83Linux 9 4,324 May-20-2021, 01:52 PM
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