you want a Pandas-specific approach? Many people would
> rather
> keep code independent of special libraries if possible;
>
> 2. How big can these collections of target cells be, roughly
speaking?
> The size could make a big difference in
target cell.
> > >
> > > the surrounding cells to consider for a specific target cell are
> > : (x-1,y),
> > > (x,y-1),(x+1,y);(x,y+1), specifically I randomly choose 1 to 4
> > cells from
> > > these and consider for repl
hould work on formatting code for this list. Your code
below is very complex and would take a lot of work to reformat to the
point where it is readable, especially with the nearly impenetrable
arguments in some places. Probably all that is needed is to replace
all
tabs by (s
very complex and would take a lot of work to reformat to the
> point where it is readable, especially with the nearly impenetrable
> arguments in some places. Probably all that is needed is to replace all
> tabs by (say) three spaces, and to make sure
that is needed is to replace all
tabs by (say) three spaces, and to make sure you intentionally break
lines well before they might get word-wrapped. Here is one example I
have reformatted (I hope I got this right):
list_tuples_idx_cells_all_datasets = list(filter(
lambda x
Hello,
I have an initial dataframe with a random list of target cells (each cell
being identified with a couple (x,y)).
I want to yield four different dataframes each containing the value of one
of the contour (surrounding) cells of each specified target cell.
the surrounding cells to consider fo
On 12/30/22 17:00, Paul Bryan wrote:
It seems to me like you have to ideas of what "equal" means. You want to
update a "non-equal/equal" value in the set (because of a different time
stamp). If you truly considered them equal, the time stamp would be
irrelevant and updating the value in the set
It seems to me like you have to ideas of what "equal" means. You want
to update a "non-equal/equal" value in the set (because of a different
time stamp). If you truly considered them equal, the time stamp would
be irrelevant and updating the value in the set would be unnecessary.
I would:
a)
On Sat, 31 Dec 2022 at 09:29, Ian Pilcher wrote:
>
> On 12/30/22 15:47, Paul Bryan wrote:
> > What kind of elements are being added to the set? Can you show
> > reproducible sample code?
>
> The objects in question are DHCP leases. I consider them "equal" if
> the lease address (or IPv6 prefix) i
On 12/30/22 15:47, Paul Bryan wrote:
What kind of elements are being added to the set? Can you show
reproducible sample code?
The objects in question are DHCP leases. I consider them "equal" if
the lease address (or IPv6 prefix) is equal, even if the timestamps have
changed. That code is not
in use, and
replacing it with the latest if needed.
Avi
-Original Message-
From: Python-list On
Behalf Of Ian Pilcher
Sent: Friday, December 30, 2022 4:41 PM
To: python-list@python.org
Subject: set.add() doesn't replace equal element
I just discovered this behavior, which is proble
On Sat, 31 Dec 2022 at 08:42, Ian Pilcher wrote:
>
> I just discovered this behavior, which is problematic for my particular
> use. Is there a different set API (or operator) that can be used to
> add an element to a set, and replace any equal element?
>
> If not, am I correct
add an element to a set, and replace any equal element?
If not, am I correct that I should call set.discard() before calling
set.add() to achieve the behavior that I want?
--
Google Where
I just discovered this behavior, which is problematic for my particular
use. Is there a different set API (or operator) that can be used to
add an element to a set, and replace any equal element?
If not, am I correct that I should call set.discard() before calling
set.add() to achieve the
no hyperlink attribute. There is
no option to make it load the links. To force it to be loaded, we need
to replace load_workbook as well. This method asks openpyxl to load
the workbook, deciding whether it will discard the links or not.
The second problem is that as soon as you instantiate an
On 9/19/22, 2qdxy4rzwzuui...@potatochowder.com
<2qdxy4rzwzuui...@potatochowder.com> wrote:
> On 2022-09-18 at 09:11:28 +,
> Stefan Ram wrote:
>
>> r...@zedat.fu-berlin.de (Stefan Ram) writes (abbreviated):
>> >types.MethodType( function, instance )
>> >functools.partial( function, instance )
>
On 2022-09-18 at 09:11:28 +,
Stefan Ram wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes (abbreviated):
> >types.MethodType( function, instance )
> >functools.partial( function, instance )
> >new_method.__get__( instance )
>
> I wonder which of these three possibilities expresses
> t
On 9/18/22, Stefan Ram wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes (abbreviated):
>>types.MethodType( function, instance )
>>functools.partial( function, instance )
>>new_method.__get__( instance )
>
> I wonder which of these three possibilities expresses
> the idea of creating a new
m 17.09.2022 um 00:35 schrieb Dan Stromberg:
On Fri, Sep 16, 2022 at 2:06 PM Ralf M. mailto:ral...@t-online.de>> wrote:
I would like to replace a method of an instance, but don't know how to
do it properly.
You appear to have a good answer, but... are you sure this is a good idea?
It
change the old method to call the new method but with the parameters the
new method expects. If you explain this in the docstrings as well. Then you do
not need to actually replace the method.
Or you had a completely different use-case in mind, that I missed.
Cheers
Lars
Lars Liedtke
Software
On 9/17/22, Chris Angelico wrote:
>
> A method IS a function. A bound method is a function with one argument
> locked in, but still a function.
We were talking past each other. A method object is not a function
object. You're talking about a function defined in a class that's
accessed as a method
On Sun, 18 Sept 2022 at 10:29, wrote:
>
>
> From your description, Chris, it sounds like the functional programming
> technique often called currying. A factory function is created where one (or
> more) parameters are sort of frozen in so the user never sees or cares about
> them, and a modified o
ase, the
function now knows what object it is attached to as this.
-Original Message-
From: Python-list On
Behalf Of Chris Angelico
Sent: Saturday, September 17, 2022 8:21 PM
To: python-list@python.org
Subject: Re: How to replace an instance method?
On Sun, 18 Sept 2022 at 09:37, Eryk
On Sun, 18 Sept 2022 at 09:37, Eryk Sun wrote:
>
> On 9/17/22, Chris Angelico wrote:
> >
> > The two are basically equivalent. Using functools.partial emphasizes
> > the fact that all you're doing is "locking in" the first parameter;
> > using the __get__ method emphasizes the fact that functions
On 9/17/22, Chris Angelico wrote:
>
> The two are basically equivalent. Using functools.partial emphasizes
> the fact that all you're doing is "locking in" the first parameter;
> using the __get__ method emphasizes the fact that functions are,
> fundamentally, the same thing as methods. Choose whi
On Sun, 18 Sept 2022 at 07:20, Ralf M. wrote:
>
> Am 16.09.2022 um 23:34 schrieb Eryk Sun:
> > On 9/16/22, Ralf M. wrote:
> >> I would like to replace a method of an instance, but don't know how to
> >> do it properly.
> >
> > A function is a descr
Am 17.09.2022 um 00:35 schrieb Dan Stromberg:
On Fri, Sep 16, 2022 at 2:06 PM Ralf M. <mailto:ral...@t-online.de>> wrote:
I would like to replace a method of an instance, but don't know how to
do it properly.
You appear to have a good answer, but... are you sure
Am 16.09.2022 um 23:34 schrieb Eryk Sun:
On 9/16/22, Ralf M. wrote:
I would like to replace a method of an instance, but don't know how to
do it properly.
A function is a descriptor that binds to any object as a method. For example:
>>> f = lambda self, x: self + x
2:06 PM Ralf M. wrote:
I would like to replace a method of an instance, but don't know how to
do it properly.
You appear to have a good answer, but... are you sure this is a good idea?
It'll probably be confusing to future maintainers of this code, and I doubt
static analyze
On Fri, Sep 16, 2022 at 2:06 PM Ralf M. wrote:
> I would like to replace a method of an instance, but don't know how to
> do it properly.
>
You appear to have a good answer, but... are you sure this is a good idea?
It'll probably be confusing to future maintainers of thi
On 9/16/22, Ralf M. wrote:
> I would like to replace a method of an instance, but don't know how to
> do it properly.
A function is a descriptor that binds to any object as a method. For example:
>>> f = lambda self, x: self + x
>>> o = 42
>&g
On Sat, 17 Sept 2022 at 07:07, Ralf M. wrote:
>
> I would like to replace a method of an instance, but don't know how to
> do it properly.
>
> My first naive idea was
>
> inst = SomeClass()
> def new_method(self, param):
> # do something
> return
I would like to replace a method of an instance, but don't know how to
do it properly.
My first naive idea was
inst = SomeClass()
def new_method(self, param):
# do something
return whatever
inst.method = new_method
however that doesn't work: self isn't passed as first p
On Tue, 14 Jun 2022 at 01:59, h3ck phy wrote:
>
> It would be nice if we could write something like this
> data: dict[str, *] = {}
> instead of
> data: dict[str, Any] = {}
>
> In import statement asterisk means "all names" in a module.
> But in type closure it should mean "all types".
Type hints
It would be nice if we could write something like this
data: dict[str, *] = {}
instead of
data: dict[str, Any] = {}
In import statement asterisk means "all names" in a module.
But in type closure it should mean "all types".
--
https://mail.python.org/mailman/listinfo/python-list
On 9/06/22 5:55 am, Dennis Lee Bieber wrote:
There are no mutable strings in Python.
If you really want a mutable sequence of characters, you can
use array.array, but you won't be able to use it directly in
place of a string in most contexts.
--
Greg
--
https://mail.python.org/mailma
On 8/06/22 10:26 pm, Jon Ribbens wrote:
Here's a head-start on some characters you might want to translate,
Another possibility that might make sense in this case is to simply
strip out all punctuation before comparing. That would take care of
things being spelled with or without hyphens, comma
On Wed, 8 Jun 2022 11:09:05 +0200, Dave declaimed
the following:
>Hi,
>
>Thanks for this!
>
>So, is there a copy function/method that returns a MutableString like in
>objective-C? I’ve solved this problems before in a number of languages like
>Objective-C and AppleScript.
There are no
out keeping your shoes dark with
>> "black polish" so I keep repeating it is very hard or frankly impossible, to
>> catch every case I can imagine and the many I can't!
>>
>> But the emphasis here is not your overall problem. It is about whether and
>>
t your overall problem. It is about whether and
> how the computer language called python, and perhaps some add-on modules, can
> be used to solve each smaller need such as recognizing a pattern or replacing
> text. It can do quite a bit but only when the specification of the problem is
&
ther and how
the computer language called python, and perhaps some add-on modules, can be
used to solve each smaller need such as recognizing a pattern or replacing
text. It can do quite a bit but only when the specification of the problem is
exact.
-Original Message-
From: Dave
To: py
On 2022-06-08, Dave wrote:
> I misunderstood how it worked, basically I’ve added this function:
>
> def filterCommonCharacters(theString):
> myNewString = theString.replace("\u2019", "'")
> return myNewString
> Which returns a new string replacing the common characters.
>
> This can easil
> On 8 Jun 2022, at 11:25, Dave wrote:
>
>myNewString = theString.replace("\u2014", “]” #just an example
Opps! Make that
myNewString = myNewString.replace("\u2014", “]” #just an example
--
https://mail.python.org/mailman/listinfo/python-list
On 2022-06-08, Dave wrote:
> Hi All,
>
> I decided to start a new thread as this really is a new subject.
>
> I've got two that appear to be identical, but fail to compare. After getting
> the ascii encoding I see that they are indeed different, my question is how
>
On Wed, Jun 8, 2022 at 1:11 AM Dave wrote:
> I've got two that appear to be identical, but fail to compare. After
> getting the ascii encoding I see that they are indeed different, my
> question is how can I replace the \u2019m with a regular single quote mark
> (or apostrophe
mon characters.
This can easily be extended to include other characters as and when they come
up by adding a line as so:
myNewString = theString.replace("\u2014", “]” #just an example
Which is what I was trying to achieve.
When you have multiple replacements to do, there's an
Hi,
I misunderstood how it worked, basically I’ve added this function:
def filterCommonCharacters(theString):
myNewString = theString.replace("\u2019", "'")
return myNewString
Which returns a new string replacing the common characters.
This can easily be extended to include other chara
o me
that you failed to realize that string methods return results. They
don't change the string in place:
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>&
Am Wed, Jun 08, 2022 at 11:09:05AM +0200 schrieb Dave:
> myString = 'Hello'
> myNewstring = myString.replace(myString,'e','a’)
That won't work (last quote) but apart from that:
myNewstring = myString.replace('e', 'a')
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
--
https:
On Wed, 8 Jun 2022 at 19:13, Dave wrote:
>
> Hi,
>
> Thanks for this!
>
> So, is there a copy function/method that returns a MutableString like in
> objective-C? I’ve solved this problems before in a number of languages like
> Objective-C and AppleScript.
>
> Basically there is a set of common c
r: 'str' object cannot be interpreted as an integer
I can’t see of a way to do this in Python?
All the Best
Dave
> On 8 Jun 2022, at 10:14, Chris Angelico wrote:
>
> On Wed, 8 Jun 2022 at 18:12, Dave wrote:
>
>> I tried the but it doesn’t seem to work?
>> myCompareF
On Wed, 8 Jun 2022 at 18:20, Dave wrote:
>
> PS
>
> I’ve also tried:
> myCompareFile1 = myTitleName
> myCompareFile1.replace("\u2019", "'")
> myCompareFile2 = myCompareFileName
> myCompareFile2.replace("\u2019", "'")
PS
I’ve also tried:
myCompareFile1 = myTitleName
myCompareFile1.replace("\u2019", "'")
myCompareFile2 = myCompareFileName
myCompareFile2.replace("\u2019", "'")
Which also doesn’t work, the replace itself work but it still fails the compare?
&
On Wed, 8 Jun 2022 at 18:12, Dave wrote:
> I tried the but it doesn’t seem to work?
> myCompareFile1 = ascii(myTitleName)
> myCompareFile1.replace("\u2019", "'")
Strings in Python are immutable. When you call ascii(), you get back a
new string, but it's o
Hi All,
I decided to start a new thread as this really is a new subject.
I've got two that appear to be identical, but fail to compare. After getting
the ascii encoding I see that they are indeed different, my question is how can
I replace the \u2019m with a regular single quote mar
t;> have you tried looping through the dictionary and changing each possible
>> character?
>>
>>
>> On Wed, Aug 5, 2020 at 5:12 PM Michio Suginoo
>> wrote:
>>
>>> Hi MRAB,
>>>
>>> Sorry, I simply do not understand the intention of your st
Sorry, I simply do not understand the intention of your statement.
>> If .replace() does not do what I want to do: to replace all ' í ' with
>> 'i'
>> in any form .
>> Could you advise me other means to do it?
>>
>> I am still a learner, so I am
Hi MRAB,
>
> Sorry, I simply do not understand the intention of your statement.
> If .replace() does not do what I want to do: to replace all ' í ' with 'i'
> in any form .
> Could you advise me other means to do it?
>
> I am still a learner, so I am not knowle
Name' : correction_dic2})
This case, unlike the earlier case, is aiming at replacing entire strings.
Thanks,
Best
On Wed, Aug 5, 2020 at 9:12 PM Michio Suginoo
wrote:
> Hi MRAB,
>
> Sorry, I simply do not understand the intention of your statement.
> If .replace() does not do what
Hi MRAB,
Sorry, I simply do not understand the intention of your statement.
If .replace() does not do what I want to do: to replace all ' í ' with 'i'
in any form .
Could you advise me other means to do it?
I am still a learner, so I am not knowledgeable. But, I presume, th
On 2020-08-06 00:06, Michio Suginoo wrote:
Hi MRAB,
Here is an example:
In the original dataframe, I have something like, 'Agronomía'. And I
try to transform it to 'Agronomia'.
In this case, I try to replace í with i: the former with a Spanish
accent, the latter withou
Hi MRAB,
Here is an example:
In the original dataframe, I have something like, 'Agronomía'. And I try to
transform it to 'Agronomia'.
In this case, I try to replace í with i: the former with a Spanish accent,
the latter without.
Thanks
Best
On Wed, Aug 5, 2020 at 8:00 PM MRA
On 2020-08-05 23:21, Michio Suginoo wrote:
Hi,
I have trouble with .replace() method in a Pandas DataFrame.
My code is something like this:
correction_dic1 = {'á': 'a', 'í': 'i', 'ú': 'u', 'ó': 'o'}
df = df.replace(
Hi,
I have trouble with .replace() method in a Pandas DataFrame.
My code is something like this:
correction_dic1 = {'á': 'a', 'í': 'i', 'ú': 'u', 'ó': 'o'}
df = df.replace({'Name' : correction_dic1})
Basica
On 2019-12-07 11:59:31 -0800, Bill Campbell wrote:
> On Sat, Dec 07, 2019, Peter J. Holzer wrote:
> >As an aside, to prevent vim from inserting tabs in the first place, set
> >expandtab
> >sw=4
> >and maybe also
> >ts=4
>
> Inserting a comment in the file like this makes thing easy.
>
On Sat, Dec 07, 2019, Peter J. Holzer wrote:
>As an aside, to prevent vim from inserting tabs in the first place, set
>expandtab
>sw=4
>and maybe also
>ts=4
Inserting a comment in the file like this makes thing easy.
# vim: expandtab sw=4 ts=4 nows wm=0
Bill
--
INTERNET: b...@cel
> On Dec 7, 2019, at 4:16 AM, Peter J. Holzer wrote:
>
> As an aside, to prevent vim from inserting tabs in the first place, set
>expandtab
>sw=4
> and maybe also
>ts=4
> (The latter is very much a matter of taste. I don't unless I have to
> edit code which already contains tabs inte
On 2019-11-29 13:46:38 +0900, 황병희 wrote:
> usally i write python code in gnu emacs on ubuntu 18.04 sometimes i
> re-edit the code vim in same machine so often when i do run the code in
> shell like as ./test.py i meet consol error -- which line wrong!
>
> so i am considering how ca
Hi, Gilmeh^^^
> We are Python people, aren't we?
Looks good, i did copy it [1], and thanks^^^
[1] https://gitlab.com/soyeomul/test/blob/master/untabify.py
Sincerely,
--
^고맙습니다 _地平天成_ 감사합니다_^))//
--
https://mail.python.org/mailman/listinfo/python-list
> Its just that I've just began to touch tkinter, and would like to know of
> bug-related pitfalls before I waste energy on trying to figure out what I
> did wrong. :-\
One thing which is not obvious or easy to debug: Text widgets have some
kind of
inefficiency related to really long lines that d
Terry,
> I have been using tk/tkinter based IDLE for over a decade on Windows with
> very few issues. I think they are similarly stable on linux, etc.
[Snip]
Thanks for that explanation.
And I see that, in my question, I should have asked for the involved OS too.
Regards,
Rudy Wieser
--
ht
On 11/29/2019 3:05 PM, R.Wieser wrote:
Terry,
Its just that I've just began to touch tkinter, and would like to know of
bug-related pitfalls before I waste energy on trying to figure out what I
did wrong. :-\
I have been using tk/tkinter based IDLE for over a decade on Windows
with very few
Terry,
> R.W., are you reading via c.l.p, or the python google group?
The first, using nntp.aioe.org
> Don't hold your breath. A similar poster I challenged on StackOverflow
> was honest enough to admit that he had not touched IDLE for a decade.
Its just that I've just began to touch tkinter,
On 11/29/2019 4:34 AM, R.Wieser wrote:
Moi,
tkinter/IDLE in py380 : completely buggy.
That troll post is not in the python-list archive (whereas RW's response
is), so it is likely from someone banned on the list itself. R.W., are
you reading via c.l.p, or the python google group?
Exampl
Hello, Pankaj^^^
> In Emacs, use "M-x untabify". [...]
Then i solved problem You nice guy!
Sincerely,
--
^고맙습니다 _地平天成_ 감사합니다_^))//
--
https://mail.python.org/mailman/listinfo/python-list
[i am writing question on comp.lang.python]
usally i write python code in gnu emacs on ubuntu 18.04 sometimes i
re-edit the code vim in same machine so often when i do run the code in
shell like as ./test.py i meet consol error -- which line wrong!
so i am considering how can i replace all tab
Moi,
> tkinter/IDLE in py380 : completely buggy.
Example code please ? (plus a description of what should happen and what
happens instead if you have it)
Regards,
Rudy Wieser
--
https://mail.python.org/mailman/listinfo/python-list
replace all tab to space 4 within python
code. if there is solution in google i am very sorry.
In Emacs, use "M-x untabify". And "M-x tabify" if you want to do the
reverse.
IDLE has entries on the Format menu to do the same.
--
Terry Jan Reedy
--
https://mail.python.org/mai
황병희 writes:
> usally i write python code in gnu emacs on ubuntu 18.04 sometimes i
> re-edit the code vim in same machine so often when i do run the code in
> shell like as ./test.py i meet consol error -- which line wrong!
>
> so i am considering how can i replace all tab to space
Markos writes:
[...]
>>> Please, any comments or tip?
>> data = pd.read_csv ('table.csv', sep = ',', skiprows = 1, decimal=b',',
>> skipinitialspace=True)
>>
> Thank you for the tip.
>
> I didn't realize that I could avoid formatting problems in the dataframe
> or array simply by using the read_
Em 22-09-2019 13:10, Piet van Oostrum escreveu:
Markos writes:
Hi,
I have a table.csv file with the following structure:
, Polyarene conc ,, mg L-1 ,,,
Spectrum, Py, Ace, Anth,
1, "0,456", "0,120", "0,168"
2, "0,456", "0,040", "0,280"
3, "0,152", "0,200", "0,280"
I open as dataframe
On 9/22/19 7:05 PM, Markos wrote:
>
> Em 22-09-2019 13:10, Piet van Oostrum escreveu:
>> Markos writes:
>>
>>> Hi,
>>>
>>> I have a table.csv file with the following structure:
>>>
>>> , Polyarene conc ,, mg L-1 ,,,
>>> Spectrum, Py, Ace, Anth,
>>> 1, "0,456", "0,120", "0,168"
>>> 2, "0,456",
Em 22-09-2019 13:10, Piet van Oostrum escreveu:
Markos writes:
Hi,
I have a table.csv file with the following structure:
, Polyarene conc ,, mg L-1 ,,,
Spectrum, Py, Ace, Anth,
1, "0,456", "0,120", "0,168"
2, "0,456", "0,040", "0,280"
3, "0,152", "0,200", "0,280"
I open as dataframe wi
Markos writes:
> Hi,
>
> I have a table.csv file with the following structure:
>
> , Polyarene conc ,, mg L-1 ,,,
> Spectrum, Py, Ace, Anth,
> 1, "0,456", "0,120", "0,168"
> 2, "0,456", "0,040", "0,280"
> 3, "0,152", "0,200", "0,280"
>
> I open as dataframe with the command:
>
> data = pd.rea
On 9/22/19, Albert-Jan Roskam wrote:
>
> Do you think it's a deliberate design choice that decimal and thousands
> where used here as params, and not a 'locale' param? It seems nice to be
> able to specify e.g. locale='dutch' and then all the right lc_numeric,
> lc_monetary, lc_time where used. Or
On 22Sep2019 07:39, Albert-Jan Roskam wrote:
On 22 Sep 2019 04:27, Cameron Simpson wrote:
On 21Sep2019 20:42, Markos wrote:
I have a table.csv file with the following structure:
, Polyarene conc ,, mg L-1 ,,,
Spectrum, Py, Ace, Anth,
1, "0,456", "0,120", "0,168"
2, "0,456", "0,040", "0,2
On 22 Sep 2019 04:27, Cameron Simpson wrote:
On 21Sep2019 20:42, Markos wrote:
>I have a table.csv file with the following structure:
>
>, Polyarene conc ,, mg L-1 ,,,
>Spectrum, Py, Ace, Anth,
>1, "0,456", "0,120", "0,168"
>2, "0,456", "0,040", "0,280"
>3, "0,152", "0,200", "0,280"
>
>I
On 21Sep2019 20:42, Markos wrote:
I have a table.csv file with the following structure:
, Polyarene conc ,, mg L-1 ,,,
Spectrum, Py, Ace, Anth,
1, "0,456", "0,120", "0,168"
2, "0,456", "0,040", "0,280"
3, "0,152", "0,200", "0,280"
I open as dataframe with the command:
data = pd.read_csv ('
2 3 0,152 0,200 0,280
I copy the numeric fields to an array with the command:
data_array = data.values [:, 1:]
And the data_array variable gets the fields in string format:
[['0,456' '0,120' '0,168']
['0,456' '0,040' '0,280
opy the numeric fields to an array with the command:
data_array = data.values [:, 1:]
And the data_array variable gets the fields in string format:
[['0,456' '0,120' '0,168']
['0,456' '0,040' '0,280']
['0,152' '0,200&
On Mon, Jul 15, 2019 at 5:45 AM Ian Kelly wrote:
>
> On Thu, Jul 11, 2019 at 11:10 PM Chris Angelico wrote:
> >
> > On Fri, Jul 12, 2019 at 2:30 PM Aldwin Pollefeyt
> > wrote:
> > >
> > > Wow, I'm so sorry I answered on the question : "How
On Thu, Jul 11, 2019 at 11:10 PM Chris Angelico wrote:
>
> On Fri, Jul 12, 2019 at 2:30 PM Aldwin Pollefeyt
> wrote:
> >
> > Wow, I'm so sorry I answered on the question : "How do you replace a
> > variable with its value". For what i understood with the
On Fri, Jul 12, 2019 at 2:30 PM Aldwin Pollefeyt
wrote:
>
> Wow, I'm so sorry I answered on the question : "How do you replace a
> variable with its value". For what i understood with the example values,
> CrazyVideoGamez wants 3 variables named like the meal-names in
Wow, I'm so sorry I answered on the question : "How do you replace a
variable with its value". For what i understood with the example values,
CrazyVideoGamez wants 3 variables named like the meal-names in dictionary.
Yes, it's not secure unless you work with your own datase
Aldwin Pollefeyt writes:
> dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
> Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
>
> # Don't ask where I got the dinner from
>
> for meal in dinner.keys():
> exec(meal.replace(' ','_') + ' = list(dinner[meal])')
>
> print(S
On Fri, Jul 12, 2019 at 4:37 AM Terry Reedy wrote:
>
> On 7/11/2019 12:51 AM, Aldwin Pollefeyt wrote:
> > dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
> > Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
> >
> > # Don't ask where I got the dinner from
> >
> > for meal i
On 11/07/2019 05:51, Aldwin Pollefeyt wrote:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
exec(meal.replace(' ','_') + ' = list(dinner[meal])')
p
On 7/11/2019 12:51 AM, Aldwin Pollefeyt wrote:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
exec(meal.replace(' ','_') + ' = list(dinner[meal])')
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
exec(meal.replace(' ','_') + ' = list(dinner[meal])')
print(Starters)
print(Main_Course)
print(Desert)
On 2019-07-11 12:43 AM, CrazyVideoGamez wrote:
How do you replace a variable with its value in python 3.7.2? For example, say
I have:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main Course':['Fish',
'Meat'], 'Dese
1 - 100 of 1278 matches
Mail list logo