[Tutor] sort by value and then by key

2017-12-24 Thread anish singh
document = "Practice makes perfect. you'll only get Perfect by practice. just practice!" output: [ ["practice", "3"], ["perfect", "2"], ["by", "1"], ["get", "1"], ["just", "1"], ["makes", "1"], ["only", "1"], ["youll", "1"] ] I am supposed to retur

[Tutor] vol 166, issue 20, 1. installing python and numpy on the Mac (OSX) (Peter Hodges)

2017-12-24 Thread Bruce Todd Puls
sudo -H python3.6 -m pip install numpy ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] sort by value and then by key

2017-12-24 Thread Alan Gauld via Tutor
On 24/12/17 08:12, anish singh wrote: > However, I am stuck. I have below code which is not working. Define "not working" Do you get an error message? (show us) If the output different to what you expect (show us) Have you tried printing the intermediate results? For example the dictionary befor

[Tutor] installation of Python 2.7 an 3.6, feedback

2017-12-24 Thread marcus lütolf
dear experts, while working through Alan C. Gould‘s excellent update on‘ Learning to Program‘ I copied the file echoinput.py from the ‚Conversing with the user‘ section: import sys inp = sys.stdin.readline() while inp.strip != '': print(inp) inp = sys.stdin.readline()

Re: [Tutor] Installing python and numpy on the Mac (OSX)

2017-12-24 Thread Abdur-Rahmaan Janhangeer
See Anaconda, a py dist packed with sci modules. Comes bundled with lots of goodies ! Abdur-Rahmaan Janhangeer, Mauritius abdurrahmaanjanhangeer.wordpress.com On 23 Dec 2017 12:45, "Peter Hodges" wrote: > Hi. I downloaded Python 3.6 from the python site, then followed online > directions for pi

Re: [Tutor] installation of Python 2.7 an 3.6, feedback

2017-12-24 Thread Alan Gauld via Tutor
On 24/12/17 15:36, marcus lütolf wrote: while working through Alan C. Gould‘s excellent update on‘ Learning to Program‘ I copied OK, First I need to point out that the tutorial content has not changed, it is still the old c2010-12 material. The update is to the structure and cosmetics to ma

Re: [Tutor] Tutor Digest, Vol 166, Issue 21

2017-12-24 Thread anish singh
>> However, I am stuck. I have below code which is not working. I don't know how to achieve this programmatically: sorted by the number of occurrences in a descending order. If two or more words have the same count, they should be sorted alphabetically (in an ascending order). > > Define "not wor