I would not use `os` as an identifier, as it is the name of an important
built-in module.
I think itertools.product is what you need.
Example program:
import itertools
opsys = ["Linux","Windows"]
region = ["us-east-1", "us-east-2"]
print(list(itertools.product(opsys, region)))
Output:
[('Linux
On 2022-03-01 at 19:12:10 -0500,
Larry Martell wrote:
> If I have 2 lists, e.g.:
>
> os = ["Linux","Windows"]
> region = ["us-east-1", "us-east-2"]
>
> How can I get a list of tuples with all possible permutations?
>
> So for this example I'd want:
>
> [("Linux", "us-east-1"), ("Linux", "us-e
If I have 2 lists, e.g.:
os = ["Linux","Windows"]
region = ["us-east-1", "us-east-2"]
How can I get a list of tuples with all possible permutations?
So for this example I'd want:
[("Linux", "us-east-1"), ("Linux", "us-east-2"), ("Windows",
"us-east-1"), "Windows", "us-east-2')]
The lists can b
On Thu, 17 Feb 2022 02:20:53 -0800 (PST), NArshad
declaimed the following:
>I have completed the homework or what so ever it used to be its only I am
>telling the solution which looks to me as better as compared to what others
>have given like the one that Christian has given.
At the r
Robert Latest writes:
> Loris Bennett wrote:
>> Thanks for the various suggestions. The data I need to store is just a
>> dict with maybe 3 or 4 keys and short string values probably of less
>> than 32 characters each per event. The traffic on the DB is going to be
>> very low, creating maybe a
Loris Bennett wrote:
> Thanks for the various suggestions. The data I need to store is just a
> dict with maybe 3 or 4 keys and short string values probably of less
> than 32 characters each per event. The traffic on the DB is going to be
> very low, creating maybe a dozen events a day, mainly tr
Cameron Simpson writes:
> On 28Feb2022 10:11, Loris Bennett wrote:
>>I have an SQLAlchemy class for an event:
>>
>> class UserEvent(Base):
>> __tablename__ = "user_events"
>>
>> id = Column('id', Integer, primary_key=True)
>> date = Column('date', Date, nullable=False)
>> ui
On Tue, 1 Mar 2022 at 22:52, Morten W. Petersen wrote:
> Yep. Well, as I said, I could create some range objects myself, and even
> create a little module and put it up on pypi, if I couldn't find any existing
> module I could use.
>
> As we're discussing this, it is clear that different point
Forwarding to the list..
-- Forwarded message -
From: Morten W. Petersen
Date: Tue, Mar 1, 2022 at 12:52 PM
Subject: Re: Timezone for datetime.date objects
To: Chris Angelico
On Mon, Feb 28, 2022 at 11:57 PM Chris Angelico wrote:
> On Tue, 1 Mar 2022 at 09:28, Morten W. Peter