Re: [Tutor] Output reason

2019-07-12 Thread Mats Wichmann
On 7/12/19 11:39 AM, Alan Gauld via Tutor wrote: > On 12/07/2019 15:24, Gursimran Maken wrote: > >> Can someone please explain me the reason for below output. > > You've been bitten by one of the most common gotchas in Python :-) > >> def fun(n,li = [

Re: [Tutor] Output reason

2019-07-12 Thread Richard Damon
,[7,8,9]) > fun(5) # reason for output (why am I getting to values in this output.) > > Output: > [[0, 1, 2, 3, 4]] > [7, 8, 9, [0, 1, 2, 3, 4]] > [7, 8, 9, [0, 1, 2, 3, 4]] > [[0, 1, 2, 3, 4], [0, 1, 2, 3, 4]] > > Thank you, > Gursimran > _

Re: [Tutor] Output reason

2019-07-12 Thread Alan Gauld via Tutor
or of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or chan

[Tutor] Output reason

2019-07-12 Thread Gursimran Maken
, 1, 2, 3, 4]] [7, 8, 9, [0, 1, 2, 3, 4]] [[0, 1, 2, 3, 4], [0, 1, 2, 3, 4]] Thank you, Gursimran ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Multiprocessing with many input input parameters

2019-07-12 Thread Shall, Sydney via Tutor
ENGLAND E-Mail: sydney.shall (Correspondents outside the College should add @KCL.AC.UK) TEL: +44 (0)208 48 59 01 From: Mike Barnett Sent: 11 July 2019 16:40 To: Shall, Sydney Cc: tutor@python.org Subject: RE: [Tutor] Multiprocessing with many input input parameters

Re: [Tutor] Multiprocessing with many input input parameters

2019-07-12 Thread Alan Gauld via Tutor
my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Make a linked list subscriptable?

2019-07-12 Thread Richard Damon
setitem__, __delitem__), and check if the argument is a slice to handle slices. -- Richard Damon ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Multiprocessing with many input input parameters

2019-07-11 Thread DL Neil
ne_item = ['item one',] @mike -Original Message- From: Shall, Sydney Sent: Wednesday, July 10, 2019 11:44 AM To: tutor@python.org Subject: [Tutor] Multiprocessing with many input input parameters I am using MAC OS X 10.14.5 on a MAC iBook I use Python 3.7.0 from Anaconda, with Spyder 3.

[Tutor] Reading .csv data vs. reading an array

2019-07-11 Thread Chip Wachob
print("Error") print("Edge array: ", edgearray)# display the array results arraysize = len(edgearray)# ends up being about twice the size of the .csv version print("Size of edagearray: ", arraysize)# show the size of the arr

Re: [Tutor] Multiprocessing with many input input parameters

2019-07-11 Thread Mike Barnett
sday, July 10, 2019 11:44 AM To: tutor@python.org Subject: [Tutor] Multiprocessing with many input input parameters I am using MAC OS X 10.14.5 on a MAC iBook I use Python 3.7.0 from Anaconda, with Spyder 3.3.3 I am a relative beginner. My program models cell reproduction. I have written

Re: [Tutor] Make a linked list subscriptable?

2019-07-11 Thread Mats Wichmann
ext node" is then available as index + 1. _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Make a linked list subscriptable?

2019-07-11 Thread Cameron Simpson
son ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Make a linked list subscriptable?

2019-07-11 Thread Sarah Hembree
val) + '> ' tmp = tmp.next return s[:-2] ll = LinkedList() [ll.prepend(x) for x in range(14,-1,-1)] >>> ll 0> 1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14 --- We not only inherit the Earth from our Ancestors, we borr

[Tutor] Multiprocessing with many input input parameters

2019-07-10 Thread Shall, Sydney via Tutor
ENGLAND E-Mail: sydney.shall (Correspondents outside the College should add @KCL.AC.UK) TEL: +44 (0)208 48 59 01 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] RE Embedding Python in C

2019-07-09 Thread Alan Gauld via Tutor
Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] RE Embedding Python in C

2019-07-09 Thread Ibarra, Jesse
n 0; } Why does this code only print the result(array([ 1., 1., 1., 1., 1.])) once, when I am calling the python code twice? Please advise, Jesse Ibarra ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Fw: [docs] Python Embedding PyImport_ImportModule

2019-07-09 Thread David
On Tue, 9 Jul 2019 at 03:13, Alan Gauld via Tutor wrote: > On 08/07/2019 15:14, Ibarra, Jesse wrote: > > > > I cannot seem to figure this potential bug out. > > Neither can we since we cannot see any code. I'm guessing this might be the original post: https://mail.python.or

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-08 Thread bob gailer
Data = [    ['2019-01-19','Fred Flintstone',23], ['2019-02-01','Scooby doo', 99] ] Warning 3: age is not a fundamental attribute; it is a computed value! -- Bob Gailer ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-08 Thread David L Neil
On 8/07/19 10:54 AM, Alan Gauld via Tutor wrote: On 07/07/2019 20:54, David L Neil wrote: (However, some of us grew-up at a time when RAM was expensive and even in our relaxed state, such 'costs' still impinge on our consciousness - Indeed, my first computer was at the local university

Re: [Tutor] Fw: [docs] Python Embedding PyImport_ImportModule

2019-07-08 Thread Alan Gauld via Tutor
tos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Fw: [docs] Python Embedding PyImport_ImportModule

2019-07-08 Thread Ibarra, Jesse
int the result(array([ 1., 1., 1., 1., 1.])) > once, when I am calling the python code twice? You're on a mailing list about Python documentation, not embedding support. Have you tried https://mail.python.org/mailman/listinfo/tutor? Bests, -- Julien Palard https://

[Tutor] Fw: [docs] Fw: Embedding Python in Another Application Import Statement Bug

2019-07-08 Thread Ibarra, Jesse
Bug Hi > Is this ticket still unsolved? I do not have a CentOS to try it. You can try on https://mail.python.org/mailman/listinfo/tutor list maybe, and if you resolve your issue and it happen to be documentation related, don't hesitate to let the docs@ list know. Bests, -- Julien Palard ht

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread Alan Gauld via Tutor
re easier (or as easy) in native Python. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______ Tutor maillist

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread David L Neil
On 8/07/19 2:48 AM, Alan Gauld via Tutor wrote: On 07/07/2019 09:19, David L Neil wrote: First-off, it has to be said that "100's of elements" suggests using an RDBMS - particularly if 'age' (eg 23 and 99) is not the only likely selection mechanism. Multiple selection mechanisms mig

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread Mats Wichmann
to Fred's age, you could end up with Data[0][2]. That would be pretty ugly, and worse, hard to remember what it meant. Try to seek ways you can give meaningful names to things. We can make suggestions if that's of interest (I don't want to belabor the point). __

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread Alan Gauld via Tutor
ite http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread David L Neil
ents: under_50 = [ 23 ] over_50 = [ 99 ] However, this would require that only one character be listed at a given age (dict keys must be unique), so another key might be a better choice! Another data structure you might consider is a "linked list". -- Regards =dn ______

Re: [Tutor] Neutral Networks

2019-07-07 Thread Carlton Banks
identify the 2nd person. When we run it, it is > not even showing an error. I need someone to look at it and let me know me > the issue. I can share the source code. > > Thank you! > > Best regards, > Rashmi > ___ > Tu

Re: [Tutor] Neutral Networks

2019-07-07 Thread Alan Gauld via Tutor
m web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread Alan Gauld via Tutor
roblem then you must explicitly create a copy. But the behaviour that you apparently want is the default. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ____

[Tutor] Neutral Networks

2019-07-07 Thread Rashmi Vimalendran
person. When we run it, it is not even showing an error. I need someone to look at it and let me know me the issue. I can share the source code. Thank you! Best regards, Rashmi ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

[Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread mhysnm1964
? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] enumerate over Dictionaries

2019-07-06 Thread Alan Gauld via Tutor
om/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] enumerate over Dictionaries

2019-07-06 Thread Suhit Kumar
05/07/19 19:57, Mats Wichmann wrote: > > On 7/4/19 3:53 PM, Alan Gauld via Tutor wrote: > > > >>> Does this means that the Dict is ordered? or it is implementation > dependent? > >> Neither, it means the items in a list always have indexes > >> starti

Re: [Tutor] enumerate over Dictionaries

2019-07-05 Thread Animesh Bhadra
Thanks Alan and Mats for the explanation. On 05/07/19 19:57, Mats Wichmann wrote: On 7/4/19 3:53 PM, Alan Gauld via Tutor wrote: Does this means that the Dict is ordered? or it is implementation dependent? Neither, it means the items in a list always have indexes starting at zero. By pure

Re: [Tutor] enumerate over Dictionaries

2019-07-05 Thread Mats Wichmann
On 7/4/19 3:53 PM, Alan Gauld via Tutor wrote: >> Does this means that the Dict is ordered? or it is implementation dependent? > > Neither, it means the items in a list always have indexes > starting at zero. > > By pure coincidence dictionaries in recent Python version

Re: [Tutor] Regarding help in python algorithm

2019-07-05 Thread Alan Gauld via Tutor
e.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Regarding help in python algorithm

2019-07-05 Thread Suhit Kumar
']): VenID = z VenLat = df['latitude'][z] VenLon = df['longitude'][z] dist = distanceCalculator(newLat,newLon,VenLat,VenLon) Data.loc[i,"Trainer"] = newName Data.loc[i,"Distance"] = dist Data.loc[i,"Subjects"] = newSub Data.loc[i,"Location"] = newLoc copyDfSub.drop(Id,inplace=True) copyDfSub.reset_index(drop=True,inplace=True) df5 = pd.merge(Data,DataTeacher,on="Venue",how='inner') df5.to_csv("trainingData.csv")___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] enumerate over Dictionaries

2019-07-04 Thread Alan Gauld via Tutor
http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] enumerate over Dictionaries

2019-07-04 Thread Animesh Bhadra
alue) This gives a output as always:- 0 Green G 1 Red R 2 Blue B Does this means that the Dict is ordered? or it is implementation dependent? Thanks & Regards, Animesh. _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Timsort on short lists

2019-07-02 Thread Mats Wichmann
ore O(n). Thoughts? Try timing it? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Timsort on short lists

2019-07-02 Thread Jordan Baltes
or 3 units in length, does the time complexity of Timsort become O(n)? I was thinking that the insertion-sort portion of Timsort would be able to sort a list of length=3 (such as [8,7,9] or [9,8,7]) in O(3) time, therefore O(n). Thoughts? ___ Tutor

Re: [Tutor] path

2019-06-30 Thread Mats Wichmann
ds good. One suggestion - a sort of general programming suggestion really - whenever you take user input, do some kind of validation on it before using it. The context may not be one where anything malicious could happen, but still, just to catch errors. _______

Re: [Tutor] path

2019-06-30 Thread ingo
"Connection SQLite":{{ "database": "{fdb.as_posix()}", "encoding": "utf-8", "type": "sqlite" }} }}, "default": "Connection SQLite" }}''' ) # TODO set up fossil in the fp dir ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python 3.7 Grids

2019-06-29 Thread boB Stepp
happens you can write code to determine if the cursor fell within either card's known coordinate space. Hope this gives you some idea of how to tackle your problem. -- boB _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscr

Re: [Tutor] path

2019-06-29 Thread ingo
Ingo ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] path

2019-06-29 Thread ingo
c:\test\this\path\ >>> print(b) c:\test\this\path\ >>> print(wa) c:\test\this\path >>> print(wb) c:\test\this\path >>> print(pa) c:\test\this\path\ >>> print(pb) c:\test\this\path\ >>> print(ppa) c:\/test/this/path >>> print(ppb) c:\/test

Re: [Tutor] path

2019-06-29 Thread Mats Wichmann
thon will interpret the backslash sequences. > \t means tab, which is why the the results look mangled. > > inp = "c:\test\drive\this" > > _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] path

2019-06-29 Thread Mats Wichmann
g because otherwise Python will interpret the backslash sequences. \t means tab, which is why the the results look mangled. inp = "c:\test\drive\this" If you're going to use pathlib, then may as well use the / operator for joining, ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] [Python-Help] Writing hello world

2019-06-29 Thread Bob Gailer
s know what kind of computer and operating system you are using. At the python. Org website you will find links to tutorials. Try some of these out. Direct future emails to tutor@python.org. Always reply all so a copy goes back to the list. ___ Tutor ma

Re: [Tutor] Python 3.7 Grids

2019-06-29 Thread Bob Gailer
even better if it's not terribly complicated paste it into the reply. be sure to reply all so everyone on the tutor list will see your reply. > There are no viruses. That's kind of like a Salesman saying "trust me". Bob Gailer _______ Tut

[Tutor] path

2019-06-29 Thread ingo
;> inp 'c:\test\\drive\this' >>> import os >>> print(os.path.normpath(inp)) c: est\drive his >>> print(pathlib.Path(inp)) c: est\drive his >>> how to go from a string to a path, how to append to a path (os.path.join or / with Path), how to turn it into 'posix'

[Tutor] Python 3.7 Grids

2019-06-29 Thread David Merrick
TutorInvercargill http://tutorinvercargill.co.nz Daves Web Designs Website http://www.daveswebdesigns.co.nz Email merrick...@gmail.com Ph 03 216 2053 Cell 027 3089 169 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

[Tutor] Python 3.7 Grids

2019-06-29 Thread David Merrick
): print('Card One is Selected') return Any suggestions are welcome -- Dave Merrick TutorInvercargill http://tutorinvercargill.co.nz Daves Web Designs Website http://www.daveswebdesigns.co.nz Email merrick...@gmail.com Ph 03 216 2053 Cell 027 3089 169 ___

[Tutor] Fwd: Re: Unexpected result when running flask application.

2019-06-28 Thread Albert-Jan Roskam
Ooops, forgot to 'reply all' -- Forwarded message -- From: Albert-Jan Roskam Date: 28 Jun 2019 21:31 Subject: Re: [Tutor] Unexpected result when running flask application. To: Cameron Simpson Cc: On 20 Jun 2019 00:56, Cameron Simpson wrote: On 19Jun2019 09:54, Alan Gauld

Re: [Tutor] Environment variables and Flask

2019-06-28 Thread Mayo Adams
ts a value, then calls the child > script; then sets a different value, then calls the child script. > > === parent.py === > import os > import subprocess > > print("Calling with MYENV_foo set") > os.environ['MYENV_foo'] = "Yes" > subprocess.run(["python

Re: [Tutor] double nodes being enter into tree structure

2019-06-28 Thread Mats Wichmann
pected to run under Python 2; in Python 3 all classes are new-style and you don't need to inherit from object to get that - and if you run a code checker on your program in a Python 3 context, it will likely tell you so. ___ Tutor maillist - Tutor@python

Re: [Tutor] Environment variables and Flask

2019-06-28 Thread Mats Wichmann
"child.py"]) print("Calling with MYENV_bar set") os.environ['MYENV_bar'] = "1" subprocess.run(["python", "child.py"]) == _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Environment variables and Flask

2019-06-28 Thread Cameron Simpson
t;How do you know I'm Mad?" asked Alice. "You must be," said the Cat, "or you wouldn't have come here." _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] double nodes being enter into tree structure

2019-06-28 Thread Alan Gauld via Tutor
web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Environment variables and Flask

2019-06-28 Thread Alan Gauld via Tutor
uthor/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] double nodes being enter into tree structure

2019-06-28 Thread mhysnm1964
): if newNode.name != self.name self.children.append(newNode) newNode.parent = self myNode.add_child(Node(name, value)) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org

[Tutor] Environment variables and Flask

2019-06-27 Thread Mayo Adams
n't really help. -- Mayo Adams ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python and DB

2019-06-27 Thread Alan Gauld via Tutor
On 27/06/2019 22:20, Brave Heart via Tutor wrote: > I would like python to write to DB so I can from DB write on a webpage with > PHP... Yes, that's easy enough. Python supports access to many databases, do you have one in mind? If not the SQLite module that comes in the standard l

Re: [Tutor] Python and DB

2019-06-27 Thread Cameron Simpson
you'd need an SQLite library for PHP, but I cannot believe that one does not exist. (Or you could also write your web application in Python instead of PHP.) Cheers, Cameron Simpson ___ Tutor maillist - Tutor@python.org To unsubscribe or change su

Re: [Tutor] Python and DB

2019-06-27 Thread Mats Wichmann
On 6/27/19 3:20 PM, Brave Heart via Tutor wrote: > I have a little RSS program , I current the out are basically outputted on my > screen, but I would like python to write to DB so I can from DB write on a > webpage with PHP... > > Kinda like I want to run a news website .. The

[Tutor] Python and DB

2019-06-27 Thread Brave Heart via Tutor
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Range command

2019-06-26 Thread Alan Gauld via Tutor
On 27/06/2019 00:07, Brick Howse via Tutor wrote: > Hello all, > > New to programming and I noticed the range command did not function like it > does in the tutorial. > For example, > I type >>>>> range(5, 10) > And the output is > range(5, 10) You

Re: [Tutor] Range command

2019-06-26 Thread Mats Wichmann
On 6/26/19 5:07 PM, Brick Howse via Tutor wrote: > Hello all, > > New to programming and I noticed the range command did not function like it > does in the tutorial. > For example, > I type >>>>> range(5, 10) > And the output is > range(5, 10) > >

Re: [Tutor] data structures general query

2019-06-26 Thread Cameron Simpson
depending on what data structure is used to arrange the data, because some actions are cheap in some structures and expensive in others, so you choose the efficient action where possible. Cheers, Cameron Simpson _______ Tutor maillist - Tutor@py

[Tutor] Range command

2019-06-26 Thread Brick Howse via Tutor
windows 10 Python 3.7.3 Any suggestions is greatly appreciated. Thank you in advance. Derek Sent from my iPhone ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] data structures general query

2019-06-26 Thread Alan Gauld via Tutor
ules. It's a very rare problem that needs a traditional data structure in Python. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______

Re: [Tutor] data structures general query

2019-06-26 Thread Mats Wichmann
On 6/26/19 11:59 AM, William Ray Wing via Tutor wrote: > One of the most useful (to me) structures is the double-ended queue ("from > collections import deque”). It creates a queue that can quickly remove an > item from one end and add an item to the other. Parti

Re: [Tutor] data structures general query

2019-06-26 Thread William Ray Wing via Tutor
y useful for displaying a sliding window into time series data, or a moving track of the most recent n observations of a physical measurement. Bill _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] data structures general query

2019-06-26 Thread Mats Wichmann
index for a database? I believe the "classic" use case is memory management - keeping track of chunks of memory. > Binary trees useful for searches? it's useful for searches if the "is A less than B" comparison is a useful property of the data you are representing. If not, it isn't

Re: [Tutor] Basic Question about Visualization for enduser

2019-06-26 Thread Oscar Benjamin
sing LaTeX. That's a common pattern for matplotlib which aims to create "publication quality figures" using vector graphics. If you actually wanted to create an interactive piece of software for other people to use on their computers then that's very different. -- Oscar _____

Re: [Tutor] data structures general query

2019-06-26 Thread Alan Gauld via Tutor
r/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] tree or link-list questions.

2019-06-26 Thread Alan Gauld via Tutor
Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] data structures general query

2019-06-26 Thread mhysnm1964
trees What other trees are their other than hierarchical tree (file systems) Link lists I would guess be useful in an index for a database? Binary trees useful for searches? Sean ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] tree or link-list questions.

2019-06-26 Thread mhysnm1964
because I am learning. I am pushing myself beyond my normal level of skills. Playing in the dark as I say. LOL Sean -Original Message- From: Tutor On Behalf Of Alan Gauld via Tutor Sent: Wednesday, 26 June 2019 2:48 AM To: tutor@python.org Subject: Re: [Tutor] tree or link-list questions

Re: [Tutor] Training, Was: Basic Question about Visualization for enduser

2019-06-25 Thread Alan Gauld via Tutor
iples will be similar but the practice very different. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _____

[Tutor] Was: Basic Question about Visualization for enduser

2019-06-25 Thread David L Neil
On 26/06/19 4:56 AM, Alan Gauld via Tutor wrote: On 25/06/2019 15:52, Sinardy Xing wrote: My question is, how currently all of this great technology glue together and as a final product for the enduser. Because I cant imagine that we install Anaconda Jupyter Notebook at frontend

Re: [Tutor] Python Imported Code

2019-06-25 Thread Alan Gauld via Tutor
l to 'it worked' and that will be seen in Part 1 code as nice2.myGlobal. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Basic Question about Visualization for enduser

2019-06-25 Thread Alan Gauld via Tutor
flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] tree or link-list questions.

2019-06-25 Thread Alan Gauld via Tutor
the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription optio

[Tutor] Python Imported Code

2019-06-25 Thread stephen.m.smith
rt3 stored as nice2 myGlobal = "hello" def changeGlobal(): global myGlobal print("first value = ", nice.myGlobal) myGlobal="it worked" print("in changeGlobal2 =", myGlobal) #changeGlobal() ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Basic Question about Visualization for enduser

2019-06-25 Thread Sinardy Xing
t.savefig('foo.png') > > savefig looks at the file extension in determining what to output. > > Without a specific question, I'm not sure what else we can say... > > > ___ > Tutor maillist -

Re: [Tutor] tree or link-list questions.

2019-06-25 Thread Alan Gauld via Tutor
Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Basic Question about Visualization for enduser

2019-06-25 Thread Alan Gauld via Tutor
w.flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Basic Question about Visualization for enduser

2019-06-25 Thread Mats Wichmann
not sure what else we can say... _______ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] python

2019-06-25 Thread Bob Gailer
hem. Bob Gailer ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] python

2019-06-25 Thread Shaon Debnath
I just wanted to know all about map() function in python. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Basic Question about Visualization for enduser

2019-06-25 Thread Sinardy Xing
, will that be possible all these done automatically and dynamically via an apps ? Thanks Kind regards Sinardy ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] tree or link-list questions.

2019-06-25 Thread mhysnm1964
 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] replacing a loop

2019-06-25 Thread Alan Gauld via Tutor
Minor nit-picks... -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______ Tutor maillist - Tutor@pytho

Re: [Tutor] replacing a loop

2019-06-24 Thread Mats Wichmann
d a pretty nice job on comprehensions, and I had saved the link, again it's down to personal taste but take a gander at this to see if it makes sense: https://treyhunner.com/2015/12/python-list-comprehensions-now-in-color/ ___ Tutor maillist - Tut

Re: [Tutor] replacing a loop

2019-06-24 Thread johnf
il"? Certainly I'm a believer in 'make it work before you make it better'. So, (after all that!) what are we really achieving here? With such quantities, is it critical to 'save time'? If so, is this part of the code really the greatest time-sink? (and we're back to the 'readability' consideration, pr

Re: [Tutor] replacing a loop

2019-06-24 Thread David L Neil
what are we really achieving here? With such quantities, is it critical to 'save time'? If so, is this part of the code really the greatest time-sink? (and we're back to the 'readability' consideration, previously mentioned) Thanks, for the provocation into answering this long-held question -

Re: [Tutor] replacing a loop

2019-06-24 Thread johnf
takes some time. So depending on circumstances you may see insignificant or significant performance differences. But, again - Rule number one: only optimize when there is a proven speed bottleneck ___ Tutor maillist - Tutor@python.org To unsubscribe

Re: [Tutor] Python type annotation question

2019-06-24 Thread Mats Wichmann
ge, that is if you really want to do something, you can, so the type hints are not enforced at runtime. Since it's not always the case that doing something possible is a good idea, the type hints are there to make it easier to detect issues. Your annotation looks funky, by the way, I'd expect to

<    1   2   3   4   5   6   7   8   9   10   >