Hello everybody,
I wanted to set up a list of strings and print one randomly.
This was really easy to set up:
For example, if I run this script five times a day I always want it to be example 4 and on another day it should pick another random which stays for this day.
Is it possible to do this and share it with another script or do I need to create some kind of config which stores the daily random-pick ?
I wanted to set up a list of strings and print one randomly.
This was really easy to set up:
#Random Variables myList = ["Example 1", "Example 1", "Example 1", "Example 1"] random = random.choice(myList) print(random)Now since this script (it's of course only an example, my actual script is more complex but I'm only focussing on the important part here) runs twice a day, I want the random choice to be the same if the day is still the same.
For example, if I run this script five times a day I always want it to be example 4 and on another day it should pick another random which stays for this day.
Is it possible to do this and share it with another script or do I need to create some kind of config which stores the daily random-pick ?