Hi,
I have been banging my head against the wall - I know I can get rid of for-loop
here, but can't figure out how. Please help! I suspect I can do np.sum on the
whole adGroup but I am lacking the imagination to visualize it.
for ind in range(adGroup.shape[0]):
row = adGroup.ilo
: python-list@python.org
Subject: Re: Problem running a FOR loop
Steve wrote:
> Compiles, no syntax errors however, line 82 seems to run only once
> when the FOR loop has completed.
> Why is that? All fields are to contain the specifications, not just
> the last one.
It seems that
Steve wrote:
> Compiles, no syntax errors however, line 82 seems to run only once when
> the FOR loop has completed.
> Why is that? All fields are to contain the specifications, not just the
> last one.
It seems that passing the StringVar to the Entry widget is not sufficient to
k
Compiles, no syntax errors however, line 82 seems to run only once when the
FOR loop has completed.
Why is that? All fields are to contain the specifications, not just the
last one.
Steve
ot;
> seek = {'a','b','c'}
> count = sum(1 for a in chars if a in seek)
>
> So you haven't really changed any semantics - and it seems that this
> is far better than fiddling with the for loop syntax.
You can use boolean as integer.
>>> ch
Creating the list is pointless in this case - sum will take any
iterable, including a generator expression:
chars = "abcaaabkjzhbjacvb"
seek = {'a','b','c'}
count = sum(1 for a in chars if a in seek)
So you haven't really changed any semantics - an
On 2020-04-10 15:44:05 -0500, Elliott Dehnbostel wrote:
> *Consider the following trivial for-loop:*
>
> chars = "abcaaabkjzhbjacvb"
> seek = {'a','b','c'}
> count = 0
> for a in chars:
> if a in seek:
> count += 1
&
On 4/10/2020 4:44 PM, Elliott Dehnbostel wrote:
chars = "abcaaabkjzhbjacvb"
seek = {'a','b','c'}
count = 0for a in chars:
if a in seek:
count += 1
Why did you repeatly omit the \n after 0? Please paste code that ran
Gross. Twice nested for a simple count.
Twice indented d
ython community and quite enjoy the more
functional features of Python 3, but have I have a peeve about it. I'd like
to propose and discuss the following enhancement to Python 3:
*Consider the following trivial for-loop:*
chars = "abcaaabkjzhbjacvb"
seek = {'a','b
allowing
> for multiple conditions to be inserted in the for loop?? That would make
> reading and writing a lot easier. Like the count problem could be rewritten
> as
> > for (a in chars and ):
> > count+=1
> >
>
> A loop fundamentally has to have an iterable and a
On Sat, Apr 11, 2020 at 11:04 AM Souvik Dutta wrote:
>
> How about completely removing the need for an if statement by allowing for
> multiple conditions to be inserted in the for loop?? That would make reading
> and writing a lot easier. Like the count problem could be rewritten as
How about completely removing the need for an if statement by allowing for
multiple conditions to be inserted in the for loop?? That would make
reading and writing a lot easier. Like the count problem could be rewritten
as
for (a in chars and ):
count+=1
On Sat, 11 Apr, 2020, 6:21 am Chris
On Sat, Apr 11, 2020 at 10:32 AM Juergen Brendel wrote:
>
>
> Hello!
>
> On Fri, 2020-04-10 at 15:44 -0500, Elliott Dehnbostel wrote:
> > chars = "abcaaabkjzhbjacvb"
> > seek = {'a','b','c'}
> > count = 0
> >
> > for a in chars if a in seek: count += 1
>
> Interesting proposal. However, I'm not su
you are left with something worse than two indents: A line break and
continuation of a for-loop/if-condition (those are the worst).
for my_well_names_variable in some_complex_iterable \
if a_complex_condition_that_needs_to_be_evaluated:
count += 1
Or maybe:
s the following enhancement to Python 3:
*Consider the following trivial for-loop:*
chars = "abcaaabkjzhbjacvb"
seek = {'a','b','c'}
count = 0for a in chars:
if a in seek:
count += 1
Gross. Twice nested for a simple count.
Agreed!
I
nal features of Python 3, but have I have a peeve about it. I'd like
to propose and discuss the following enhancement to Python 3:
*Consider the following trivial for-loop:*
chars = "abcaaabkjzhbjacvb"
seek = {'a','b','c'}
count = 0for a in chars:
i
On 10May2019 08:08, Madhavan Bomidi wrote:
I have to append requisite data matrix from multiple files into a
single variable using FOR loop.
outData = [];
for file in fileList:
allData = # an array of nrows and ncols.
outData = [outData; allData] # in MATLAB
On 10/05/2019 16:08, Madhavan Bomidi wrote:
Hi,
I have to append requisite data matrix from multiple files into a single
variable using FOR loop.
outData = [];
for file in fileList:
allData = # an array of nrows and ncols.
outData
Hi,
I have to append requisite data matrix from multiple files into a single
variable using FOR loop.
outData = [];
for file in fileList:
allData = # an array of nrows and ncols.
outData = [outData; allData] # in MATLAB
While the ncols are
On 2018-03-14 00:23, Dhileepan Kumar wrote:
#!/usr/bin/python
import serial
import MySQLdb
while True:
#establish connection to MySQL. You'll have to change this for your database.
dbConn = MySQLdb.connect("localhost","root","1234","ifet") or die ("could
not connect to database")
On Wed, Mar 14, 2018 at 11:23 AM, Dhileepan Kumar wrote:
>
> #!/usr/bin/python
>
> import serial
> import MySQLdb
> while True:
> #establish connection to MySQL. You'll have to change this for your database.
> dbConn = MySQLdb.connect("localhost","root","1234","ifet") or die
> ("could not
#!/usr/bin/python
import serial
import MySQLdb
while True:
#establish connection to MySQL. You'll have to change this for your database.
dbConn = MySQLdb.connect("localhost","root","1234","ifet") or die
("could not connect to database")
#open a cursor to the database
cu
On Monday, February 26, 2018 at 12:57:25 PM UTC+5:30, Chris Angelico wrote:
> On Mon, Feb 26, 2018 at 5:19 AM, wrote:
> > Why we don’t use:
> >
> > for _ in _ in _
> >
> > Instead of
> >
> > for _ in _:
> > for _ in _:
> >
> > Ex:
> >
> > Names = ["Arya","Pupun"]
> >
> > for name in Names
On Monday, February 26, 2018 at 6:23:24 AM UTC+5:30, Rick Johnson wrote:
> On Sunday, February 25, 2018 at 12:19:56 PM UTC-6, arya.ku...@gmail.com wrote:
>
> > Ex:
> >
> > Names = ["Arya","Pupun"]
> >
> > for name in Names:
> >for c in name:
> >print(c)
> >
> > instead use:
> >
> >
On Monday, February 26, 2018 at 6:20:06 AM UTC+5:30, Ian wrote:
> On Sun, Feb 25, 2018 at 11:19 AM, wrote:
> > Why we don’t use:
> >
> > for _ in _ in _
> >
> > Instead of
> >
> > for _ in _:
> > for _ in _:
> >
> > Ex:
> >
> > Names = ["Arya","Pupun"]
> >
> > for name in Names:
> >fo
On Monday, February 26, 2018 at 8:51:35 PM UTC+5:30, Ian wrote:
> On Sun, Feb 25, 2018 at 8:05 PM, INADA Naoki wrote:
> > https://docs.python.org/3.6/library/itertools.html#itertools.product
>
> I don't see how you would use itertools.product to do what the OP
> asked for. You could use itertools
On Sun, Feb 25, 2018 at 8:05 PM, INADA Naoki wrote:
> https://docs.python.org/3.6/library/itertools.html#itertools.product
I don't see how you would use itertools.product to do what the OP
asked for. You could use itertools.chain.from_iterable, though:
py> names = ['Jack', 'Susan']
py> list(chai
On Mon, Feb 26, 2018 at 5:19 AM, wrote:
> Why we don’t use:
>
> for _ in _ in _
>
> Instead of
>
> for _ in _:
> for _ in _:
>
> Ex:
>
> Names = ["Arya","Pupun"]
>
> for name in Names:
>for c in name:
>print(c)
>
> instead use:
>
> for c in name in Names:
> print(c)
B
https://docs.python.org/3.6/library/itertools.html#itertools.product
On Mon, Feb 26, 2018 at 3:19 AM, wrote:
> Why we don’t use:
>
> for _ in _ in _
>
> Instead of
>
> for _ in _:
> for _ in _:
>
> Ex:
>
> Names = ["Arya","Pupun"]
>
> for name in Names:
>for c in name:
>print
On Sunday, February 25, 2018 at 12:19:56 PM UTC-6, arya.ku...@gmail.com wrote:
> Ex:
>
> Names = ["Arya","Pupun"]
>
> for name in Names:
>for c in name:
>print(c)
>
> instead use:
>
> for c in name in Names:
> print(c)
Hmm. Why stop there?
bit = ["kibbles"]
bits = [bit, bit
On Sun, Feb 25, 2018 at 11:19 AM, wrote:
> Why we don’t use:
>
> for _ in _ in _
>
> Instead of
>
> for _ in _:
> for _ in _:
>
> Ex:
>
> Names = ["Arya","Pupun"]
>
> for name in Names:
>for c in name:
>print(c)
>
> instead use:
>
> for c in name in Names:
> print(c)
Why we don’t use:
for _ in _ in _
Instead of
for _ in _:
for _ in _:
Ex:
Names = ["Arya","Pupun"]
for name in Names:
for c in name:
print(c)
instead use:
for c in name in Names:
print(c)
--
https://mail.python.org/mailman/listinfo/python-list
Stefan Ram wrote:
> Which advice do you refer to?
Teach the parts that are most useful first, i. e. for loops over anything
but range rather than while loops.
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 8 Oct 2017 03:58 am, Terry Reedy wrote:
> No built-in function is an instance of FunctionType
> >>> isinstance(compile, FunctionType)
> False
Ah yes, thanks Terry, I forgot that builtin functions have a distinct type.
[...]
> FunctionType == function defined by def statement or lambda
On Sun, Oct 8, 2017 at 3:58 AM, Terry Reedy wrote:
> No built-in function is an instance of FunctionType
isinstance(compile, FunctionType)
> False
isinstance(print, FunctionType)
> False
type(compile)
>
type(int.bit_length)
>
>
>
> FunctionType == function defined by def stat
On 10/7/2017 5:09 AM, Steve D'Aprano wrote:
On Fri, 6 Oct 2017 11:44 pm, ROGER GRAYDON CHRISTMAN wrote:
Despite the documentation, I would still be tempted to say that range is a
function.
Taking duck-typing to the meta-level, every time I use range, I use its name
followed
by a pair of parenth
On Fri, 6 Oct 2017 11:44 pm, ROGER GRAYDON CHRISTMAN wrote:
> Despite the documentation, I would still be tempted to say that range is a
> function.
> Taking duck-typing to the meta-level, every time I use range, I use its name
> followed
> by a pair of parentheses enclosing one to three parameter
On Sat, 7 Oct 2017 03:25 am, Stefan Ram wrote:
> FWIW, in my course notes, I have coined a special word for
> this:
>
> A /prelate/ (German: "Prälat") is a callable value (object).
In English, prelate is a kind of priest, a senior clergyman and dignitary.
I don't know whether German make
On 10/6/2017 8:44 AM, ROGER GRAYDON CHRISTMAN wrote:
Despite the documentation, I would still be tempted to say that range is a
function.
It is, *according* to the documentation. Built-in classes are included
in Library Reference, Ch. 2, Built-in Functions. Changing that to
"Built-in Funct
On 6 October 2017 at 13:44, ROGER GRAYDON CHRISTMAN wrote:
> Despite the documentation, I would still be tempted to say that range is a
> function.
> Taking duck-typing to the meta-level, every time I use range, I use its name
> followed
> by a pair of parentheses enclosing one to three parameters
On Thu, Oct 5, 2017 7:45 PM, breamore...@gmail.com wrote:
>
On Friday, October 6, 2017 at 2:05:58 AM UTC+1, Irv Kalb wrote:
>>
>> The range function is discussed after that.
>>
>
>FWIW range isn't a function in Python 3. From
https://docs.python.org/3/library/functions.html#func-range "Rathe
On Friday, October 6, 2017 at 2:05:58 AM UTC+1, Irv Kalb wrote:
>
> The range function is discussed after that.
>
FWIW range isn't a function in Python 3. From
https://docs.python.org/3/library/functions.html#func-range "Rather than being
a function, range is actually an immutable sequence
function).
Irv
PS: I teach the while loop way before I teach the for loop. That's because I
use while loops to show how to allow the user to do things like play a small
game over and over until the user says that they want to quit. I introduce the
for loop only after teaching about li
se the range in the first for loop.
I never intended to use »range«. But I also will not use lists.
Very early in the course, I teach numeric and string literals:
1, 2.3, 'abc'
then come operators, functions and »if«, »while« and »try«.
But neither »range« nor lists have bee
r-loops.
>>>>Why?
>>The easy answer here is to not use the range in the first for loop.
>
> I never intended to use »range«. But I also will not use lists.
>
> Very early in the course, I teach numeric and string literals:
>
> 1, 2.3, 'abc'
>
Hello python friends,
I need a suggestion on the below piece of code . I have for loop and I
need to do the below i.e create 100 of queue ,open ,and append some data
to a data structure. Is multiple try except the way to go or any other
idea's.
I feel that there is a better way to
> I'm trying to make the following code work:
> ...
It seems fairly clear that you've posted code which couldn't possibly
run (missing a closing quote and right paren). Let me suggest:
1. You copy and paste directly from a Python (or IPython/Jupyter/IDLE)
session, including prompts and output.
2
I'm trying to make the following code work:
import os, sys
app=['host1', 'host2', 'host3']
for i in app:
os.system('nmap -p 22 -P0 %s | grep open 2>&1 > /dev/null && echo "%s up"
I've tried many different iterations of the os.system call, how to make this
work?
TIA
--
https://mail.pytho
> On Apr 12, 2017, at 7:18 AM, Masoud Afshari wrote:
>
> Dear all
>
> I have several *.sfd files which created by a simulation code. I wrote a
> program containing a for Loop which reads each time one .sfd file and plot
> the requested Parameters. I have two request:
On Wed, 12 Apr 2017 04:18:45 -0700, Masoud Afshari wrote:
> filename ="Ex_resample" +'_sdf_'+ str(n)+'.dat'
> with open(filename, 'rb') as f: #read binary file data = np.fromfile(f,
> dtype='float64', count=nx*ny) #float64 for Double precision float numbers
> Ex = np.reshape(data, [ny, nx], ord
Dear all
I have several *.sfd files which created by a simulation code. I wrote a
program containing a for Loop which reads each time one .sfd file and plot
the requested Parameters. I have two request:
1- my Problem is that for Showing successive Images in for Loop I have to
Close the
Iranna Mathapati writes:
> How to fix it and now i got below error for same script
Fixing "timeout" problems is (usually) not a Python question.
A "timeout" can have various reasons:
* you make something fundamentally wrong - i.e. try to connect
to something which is inaccessible (e.g. by "
Hi ,
How to fix it and now i got below error for same script
*runtimeerror threads can only be started once then*
*Thanks,*
On Sat, Apr 1, 2017 at 1:15 PM, dieter wrote:
> Iranna Mathapati writes:
> > ...
> > Exception in thread Thread-5:
> > Traceback (most recent call last):
> > ...
> >
Iranna Mathapati writes:
> ...
> Exception in thread Thread-5:
> Traceback (most recent call last):
> ...
> File
> "/auto/n3k-qa/CODC/ianandan/pyATS2.7/lib/python2.7/site-packages/pexpect/__init__.py",
> line 1466, in expect_list
> timeout, searchwindowsize)
> File
> "/auto/n3k-qa/CODC/ian
Hi team,
I tried to run fallowing run,
*jobs = []*
*sniffer1 = threading.Thread(target=validate_traffic_stats_dy,args=
(FT_item_dy,RT_item_dy,forward_path_list_dy,return_path_list_dy,nat_type_list_dy,pkt_dy_1,))*
*jobs.append(sniffer1)*
*sniffer2 =
threading.Thr
>def return_files(file_list):
>"""
>Take a list of files and return file when called.
>
>Calling function to supply attributes
>"""
>for file in file_list:
>with open(os.path.join(dir_path, file), 'rb') as fd:
>if os.stat(fd.name).st_size == 0:
>
Ah yes. Thanks ChrisA
http://www.tutorialspoint.com/python/python_loop_control.htm
The continue Statement:
The continue statement in Python returns the control to the beginning of the
while loop. The continue statement rejects all the remaining statements in the
current iteration of the loop an
On Wed, Dec 21, 2016 at 8:47 PM, Sayth Renshaw wrote:
> def return_files(file_list):
> """
> Take a list of files and return file when called.
>
> Calling function to supply attributes
> """
> for file in file_list:
> with open(os.path.join(dir_path, file), 'rb') as fd:
Hi
I am looping a list of files and want to skip any empty files.
I get an error that str is not an iterator which I sought of understand but
can't see a workaround for.
How do I make this an iterator so I can use next on the file if my test returns
true.
Currently my code is.
for dir_path, s
Elizabeth Weiss wrote:
> words=["hello", "world", "spam", "eggs"]
> counter=0
> max_index=len(words)-1
>
> while counter<=max_index:
> word=words[counter]
> print(word + "!")
> counter=counter + 1
while 0 < 10:
get 0'th element
do something with element
increment 0 to 1
(repeat)
words[0
On Sat, 15 Oct 2016 22:23:29 -0700, 380162267qq wrote:
> c="abcdefghijk"
> len=len(c)
> n is a int sb=[[] for i in range(n)]
>
> while (i < len) {
> for (int j = 0; j < n && i < len; j++)
> sb[j].append(c[i++]);
> for (int j = n-2; j >= 1 && i < len; j--) //
>
would be helpful, too.
What follows are mechanical translations of what I think your original C
code does.
(1) You can use a while loop to replace C's for
# example: first for loop
j = ;
while j < n and i < length:
sb[j].append(chars[i])
i += 1
j += 1
which shoul
On Sunday 16 October 2016 16:23, 38016226...@gmail.com wrote:
> c="abcdefghijk"
> len=len(c)
> n is a int
> sb=[[] for i in range(n)]
>
> while (i < len) {
> for (int j = 0; j < n && i < len; j++)
> sb[j].append(c[i++]);
> for (int j = n-2; j >= 1 && i < len; j--)
c="abcdefghijk"
len=len(c)
n is a int
sb=[[] for i in range(n)]
while (i < len) {
for (int j = 0; j < n && i < len; j++)
sb[j].append(c[i++]);
for (int j = n-2; j >= 1 && i < len; j--) //
sb[j].append(c[i++]);
}
How to translate to python? I tried
I updated the code in msdn forum,
I calculated from the end of file
Discover file 4550 takes a long time to run,
Assume it runs a whole day a file, 4550 days I guess need 12 years to finish
full combination if only run at home.
Hope Python sympy can be faster than cmaple in Amazon instance
--
Sorry my calculation is wrong, it should have around 14 billions of
combinations after using program to count.
--
https://mail.python.org/mailman/listinfo/python-list
https://social.msdn.microsoft.com/Forums/vstudio/en-US/5f0a9a51-a256-4671-a5fc-e213949e7204/how-to-refactor-3-nested-for-loop-into-smaller-for-loop-assume-each-of-them-independent?forum=csharpgeneral
since when i dsolve a differential ideal used near 5GB memory for one ideal
, i feel that i
On Mon, Oct 10, 2016 at 9:40 AM, Marko Rauhamaa wrote:
> Chris Angelico :
>> Yeah, if it's just for progress status. Of course, that does assume
>> that the run() function doesn't have anything particularly costly in
>> it. If it does, well, dis gonna take a while
>
> Dealing with multigigabyt
Chris Angelico :
> Yeah, if it's just for progress status. Of course, that does assume
> that the run() function doesn't have anything particularly costly in
> it. If it does, well, dis gonna take a while
Dealing with multigigabyte data streams is not over the top nowadays.
Marko
--
https:/
On Mon, Oct 10, 2016 at 4:57 AM, BartC wrote:
> On 09/10/2016 18:33, Jussi Piitulainen wrote:
>>
>> Chris Angelico writes:
>>
>>> On Mon, Oct 10, 2016 at 12:26 AM, Dennis Lee Bieber wrote:
{This response is delayed as I'm waiting for the program to complete so
I
can get the run
https://social.msdn.microsoft.com/Forums/vstudio/en-US/5f0a9a51-a256-4671-a5fc-e213949e7204/how-to-refactor-3-nested-for-loop-into-smaller-for-loop-assume-each-of-them-independent?forum=csharpgeneral
I wrote a algorithm to split for loop to generate maplesoft code for limited
memory
Assume I
On 09/10/2016 18:33, Jussi Piitulainen wrote:
Chris Angelico writes:
On Mon, Oct 10, 2016 at 12:26 AM, Dennis Lee Bieber wrote:
{This response is delayed as I'm waiting for the program to complete so I
can get the run time}
{Well... it's been near 24 hours and still merrily scrolling sums on m
Chris Angelico writes:
> On Mon, Oct 10, 2016 at 12:26 AM, Dennis Lee Bieber wrote:
>> {This response is delayed as I'm waiting for the program to complete so I
>> can get the run time}
>> {Well... it's been near 24 hours and still merrily scrolling sums on my
>> console -- so I'm going to kill th
On Mon, Oct 10, 2016 at 12:26 AM, Dennis Lee Bieber
wrote:
> {This response is delayed as I'm waiting for the program to complete so I
> can get the run time}
> {Well... it's been near 24 hours and still merrily scrolling sums on my
> console -- so I'm going to kill the running program}
Eight BIL
Chris Angelico wrote:
Fascinating! What about: except sys.intern('type error') ? Or does
interning of strings not exist yet :)
Even if it was, I don't think there was any guarantee
that the "official" strings representing those exceptions
would be interned.
You were supposed to use the provide
On Sun, 9 Oct 2016 12:53 pm, Chris Angelico wrote:
>> They're caught by identity, though - "except 'type error'" fails to
>> catch TypeError, and vice versa.
>
> Fascinating! What about: except sys.intern('type error') ? Or does
> interning of strings not exist yet :)
>>> intern
Unhandled except
On Sun, 9 Oct 2016 05:45 am, Random832 wrote:
> On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote:
>> The oldest version I have access to is the *extremely* primitive 0.9. Not
>> surprisingly, it doesn't have xrange -- but it lacks a lot of things,
>> including globals(), map(), named exceptions
On Sun, Oct 9, 2016 at 5:45 AM, Random832 wrote:
> On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote:
>> The oldest version I have access to is the *extremely* primitive 0.9. Not
>> surprisingly, it doesn't have xrange -- but it lacks a lot of things,
>> including globals(), map(), named excepti
On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote:
> The oldest version I have access to is the *extremely* primitive 0.9. Not
> surprisingly, it doesn't have xrange -- but it lacks a lot of things,
> including globals(), map(), named exceptions, "" strings ('' is okay),
> exponentiation, and mor
On Sat, Oct 8, 2016, at 06:12, BartC wrote:
> The OP's code however is a good demonstration of how crazy Python's
> original for-range loop was: you need to construct a list of N elements
> just to be able to count to N. How many years was it until xrange was
> introduced?
Python 1.4 had it, an
meInvent bbird writes:
> how to refactor nested for loop into smaller for loop assume each of them
> independent?
>
> because memory is not enough
>
> for ii in range(1,2000):
> for jj in range(1,2000):
> for kk in range(1,2000):
> print run(ii,jj,kk)
n =
On Sat, 8 Oct 2016 09:12 pm, BartC wrote:
> The OP's code however is a good demonstration of how crazy Python's
> original for-range loop was: you need to construct a list of N elements
> just to be able to count to N. How many years was it until xrange was
> introduced?
Python 1.4 (that's 1996)
On 08/10/2016 11:54, Chris Angelico wrote:
On Sat, Oct 8, 2016 at 9:12 PM, BartC wrote:
On 08/10/2016 11:03, Chris Angelico wrote:
On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird
wrote:
how to refactor nested for loop into smaller for loop assume each of them
independent?
because memory
On Sat, Oct 8, 2016 at 9:12 PM, BartC wrote:
> On 08/10/2016 11:03, Chris Angelico wrote:
>>
>> On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird
>> wrote:
>>>
>>> how to refactor nested for loop into smaller for loop assume each of them
>>> i
On 08/10/2016 11:03, Chris Angelico wrote:
On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird wrote:
how to refactor nested for loop into smaller for loop assume each of them
independent?
because memory is not enough
for ii in range(1,2000):
for jj in range(1,2000):
for kk in range(1,2000
On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird wrote:
> how to refactor nested for loop into smaller for loop assume each of them
> independent?
>
> because memory is not enough
>
> for ii in range(1,2000):
> for jj in range(1,2000):
> for kk in range(1,2000):
>
how to refactor nested for loop into smaller for loop assume each of them
independent?
because memory is not enough
for ii in range(1,2000):
for jj in range(1,2000):
for kk in range(1,2000):
print run(ii,jj,kk)
--
https://mail.python.org/mailman/listinfo/python-list
t: Tuesday, October 4, 2016 7:00:48 AM
To: python-list@python.org
Subject: Re: Is that forwards first or backwards first? (Re: unintuitive
for-loop behavior)
On Tuesday 04 October 2016 14:51, Michael Torrie wrote:
> On 10/03/2016 08:21 PM, Steve D'Aprano wrote:
>> On Tue, 4 Oct 2016
On Tuesday 04 October 2016 14:51, Michael Torrie wrote:
> On 10/03/2016 08:21 PM, Steve D'Aprano wrote:
>> On Tue, 4 Oct 2016 05:48 am, Michael Torrie wrote:
>>
>>> There is that old, but false, saying that the only intuitive interface
>>> is the nipple. Turns out everything, even that, is learn
On Mon, 3 Oct 2016 10:57:27 -0700 (PDT), sohcahto...@gmail.com declaimed
the following:
>
My car is similar, but the R is actually to the left of 1. It looks like this:
R 1 3 5
+-+-+-+
2 4 6
Mine is actually like that too, but it feels like you're
doing the same thing in both cases -- push l
On 10/03/2016 08:21 PM, Steve D'Aprano wrote:
> On Tue, 4 Oct 2016 05:48 am, Michael Torrie wrote:
>
>> There is that old, but false, saying that the only intuitive interface
>> is the nipple. Turns out everything, even that, is learned
>
> Citation required.
Sure, just ask a nursing woman.
>
On Tuesday, October 4, 2016 at 8:11:41 AM UTC+5:30, Steve D'Aprano wrote:
> On Mon, 3 Oct 2016 04:15 pm, Jussi Piitulainen wrote:
>
> > Steve D'Aprano writes:
> >> Why shouldn't people say that binding and assignment are the same
> >> thing in Python? What's the difference?
> >
> > Outside Python
On Mon, 3 Oct 2016 04:15 pm, Jussi Piitulainen wrote:
> Steve D'Aprano writes:
>> Why shouldn't people say that binding and assignment are the same
>> thing in Python? What's the difference?
>
> Outside Python, (lambda x : f(x)) is said to "bind" x. It's different
> from assigning a new value to
On Tue, 4 Oct 2016 05:48 am, Michael Torrie wrote:
> There is that old, but false, saying that the only intuitive interface
> is the nipple. Turns out everything, even that, is learned
Citation required.
Of course many things are intuitive/instinctive, e.g. breathing, but as far
as *interfaces*
BartC wrote:
On 03/10/2016 12:53, Marko Rauhamaa wrote:
Well, it could be worse. This layout is pretty traditional:
1 3 5
| | |
+--+--+
| | |
2 4 R
Yes, you get a funny grinding sound when attempting to change from 5th
to '6th' at 70mph/110kph. Fortunately it doe
On 10/03/2016 11:57 AM, sohcahto...@gmail.com wrote:
> Surprisingly, despite driving that previous car for 13 years, the switch was
> incredibly easy. I've never accidentally gone to sixth gear instead of
> reverse, or forgotten to shift into sixth on the highway. Also, accidentally
> going in
On 10/03/2016 03:10 AM, Gregory Ewing wrote:
> Rustom Mody wrote:
>> My new car goes in reverse when I put it in first gear but only on full-moon
>> nights with the tank on reserve when the left light is blinking
>
> OT aside: When I went to take my current car (a manual)
> for a test drive, I ha
On Monday, October 3, 2016 at 2:11:12 AM UTC-7, Gregory Ewing wrote:
> Rustom Mody wrote:
> > My new car goes in reverse when I put it in first gear but only on
> > full-moon
> > nights with the tank on reserve when the left light is blinking
>
> OT aside: When I went to take my current car (a m
On Monday, October 3, 2016 at 5:41:23 PM UTC+1, BartC wrote:
> On 03/10/2016 16:03, wrote:
> > On Monday, October 3, 2016 at 12:53:55 PM UTC+1, Marko Rauhamaa wrote:
> >> Gregory Ewing:
> >>
> >>> Turns out the only difference between first and reverse on that model
> >>> is whether you lift up a l
On 03/10/2016 16:03, breamore...@gmail.com wrote:
On Monday, October 3, 2016 at 12:53:55 PM UTC+1, Marko Rauhamaa wrote:
Gregory Ewing:
Turns out the only difference between first and reverse on that model
is whether you lift up a little ring on the shaft of the gear lever
prior to engagement.
1 - 100 of 1004 matches
Mail list logo