Re: [Tutor] Practice Exercises for Beginner ? :p:

2016-06-03 Thread Thomas C. Hicks
On Jun 2, 2016, at 16:43, Andrei Colta wrote: Hi, Anyone can recommend practical work on learning python.. seems reading and reading does not helping. Thanks in advance, Andrei I would echo those saying "make something" - for me the thing that really moved me

Re: [Tutor] Recommendations for best tool to write/run Python :p:

2016-03-03 Thread Thomas C. Hicks
used Ipython (now Jupyter) for teaching my kids programming in middle and high school. === Thomas C. Hicks, MD, MPH Training Manager Gansu Gateway, Lanzhou, Gansu ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] Recommendations for best tool to write/run Python :p:

2016-03-03 Thread Thomas C. Hicks
Matt, As a physician myself just getting into the world of teaching computer programming I would be very interested to know what you teach to the doctors. Feel free to reply off list, would love to discuss this! === Thomas C. Hicks, MD, MPH Training Manager Gansu Gateway

Re: [Tutor] Create complex dictionary :p:

2015-10-22 Thread Thomas C. Hicks
On 10/23/2015 05:19 AM, jarod_v6--- via Tutor wrote: Hi!!I would like to prepare a dictionary with complex structure: complex = {name ="value",surname="po",age=poi) What is the most pythonic way to build a dictionary of dictionary?thanks for any help! This doesn't look too complex so I

Re: [Tutor] Create complex dictionary :p: :p:

2015-10-22 Thread Thomas C. Hicks
On 10/23/2015 05:59 AM, Alex Kleider wrote: mydict = dict('name'='value', 'surname'='po','age'='poi') Oops, you are correct! Don't want to put the key names in quotes, I mistyped my experiment. SDG, tom ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] Pytest help :p:

2015-07-07 Thread Thomas C. Hicks
list is outstanding, civil, knowledgable people really wanting to help. == Thomas C. Hicks, MD, MPH Training Manager, Gansu Gateway Lanzhou, Gansu, PR China ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] creat a program that reads frequency of words in file :p:

2015-06-01 Thread Thomas C. Hicks
On 06/01/2015 05:56 PM, Alan Gauld wrote: if text in line: count += 1 print(This word appears, count, times in the file) And this is, of course, completely off track. You need to split the line into its separate words and store each word into the dictionary. OP may want to

Re: [Tutor] Integrating TDD into my current project work-flows :p:

2015-05-05 Thread Thomas C. Hicks
On 05/06/2015 07:18 AM, WolfRage wrote: I find myself in the same mind set as this individual: http://stackoverflow.com/a/64453/4285911 It is hard to write a proper test with out me initially outlining where I am going. Perhaps I need to better understand planning and drafting a programming

Re: [Tutor] How to output dictionary data to CSV file :p:

2015-04-28 Thread Thomas C. Hicks
On 04/28/2015 09:43 PM, Alan Gauld wrote: You could consider JSON too. JSON looks a lot like a Python dictionary of strings so is almost a perfect match to your data. Sounds great, I'll check it out. Thanks! thomas == Thomas C. Hicks, MD, MPH Training Manager

Re: [Tutor] How to output dictionary data to CSV file :p:

2015-04-28 Thread Thomas C. Hicks
On 04/28/2015 05:30 PM, Peter Otten wrote: data = {'B002':'NRP 2014','B003':'HBB 2015'} writer = csv.writer(sys.stdout) writer.writerows(data.items()) B002,NRP 2014 B003,HBB 2015 That is exactly what I was looking for! Thanks, apparently my knowledge deficit is in understanding dictionary

[Tutor] Displaying data in columns

2012-05-07 Thread Thomas C. Hicks
I have some data that comes out of a database as a list of tuples of integers and strings, one tuple for each row in the ResultProxy from the select operation. The data looks something like this: [(56, 12, 8, u'2012-02', 10, 12, u'Guangxi Province', u'Guangxi', u'10', 8, u'TOT'), (57, 21, 1,

[Tutor] Wading through traceback output

2011-12-26 Thread Thomas C. Hicks
I have a script that I used to be quite proud of, up until today it was working great. Basically it reads in a directory tree of spreadsheets, extracts info from them then makes a new spreadsheet to output the info to. The spreadsheets are xls files so it uses xlrd and xlwt to manage the data

Re: [Tutor] Wading through traceback output :p:

2011-12-26 Thread Thomas C. Hicks
On Mon, 26 Dec 2011 07:10:45 -0500 Alan Gauld alan.ga...@btinternet.com wrote: On 26/12/11 11:42, Thomas C. Hicks wrote: Given it was working before and not now the obvious question is what has changed? It looks like you are on a Linux box so do you have automatic updates switched on? Or do

Re: [Tutor] Assigning range :p:

2011-07-27 Thread Thomas C. Hicks
On Wed, 27 Jul 2011 20:16:31 -0400 Alexander Quest alexxqu...@gmail.com wrote: Does anyone know how to assign a certain numerical range to a variable, and then choose the number that is the middle of that range? For example, I want to assign the variable X a range between 1 and 50, and then I

Re: [Tutor] voluntary work :p:

2011-04-25 Thread Thomas C. Hicks
On Mon, 25 Apr 2011 15:09:02 -0400 Rafael Durán Castañeda rafadurancastan...@gmail.com wrote: I recommend you visit www.pythonchallenge.comhttp://www.pythonchallenge.com On 25/04/11 20:42, Wolf Halton wrote: Learn Python the Hard Way is pretty cool. I am always looking for books that lay

Re: [Tutor] While Loops: Coin Flip Game :p:

2010-11-14 Thread Thomas C. Hicks
On Sun, 14 Nov 2010 17:16:36 -0500 Dawn Samson sd...@live.ca wrote: Greetings, I'm a Python beginner and working my way through Michael Dawson's Python Programming for the Absolute Beginner. I'm stuck in a particular challenge that asks me to write a program that flips a coin 100 times and

Re: [Tutor] string to list

2010-08-05 Thread Thomas C. Hicks
On Thu, 5 Aug 2010 03:40:55 -0400 Sander Sweers sander.swe...@gmail.com wrote: On 5 August 2010 06:38, Vikram K kpguy1...@gmail.com wrote: Suppose i have this string: z = 'AT/CG' How do i get this list: zlist = ['A','T/C','G'] If you know the format of the string is always the

Re: [Tutor] how to do excel in python

2010-08-05 Thread Thomas C. Hicks
On Thu, 5 Aug 2010 10:08:59 -0400 invincible patriot invincible_patr...@hotmail.com wrote: hi, can any one tell me how can I access MS excel worksheet in python and how can I access itz individual cells..?? I have had good luck with the xlrd and xlwt modules, you can get them at

Re: [Tutor] Help return a pattern from list

2010-07-05 Thread Thomas C. Hicks
On Mon, 05 Jul 2010 20:29:02 +0200 tutor-requ...@python.org wrote: Date: Mon, 5 Jul 2010 13:54:55 -0400 From: Vineeth Rakesh vineethrak...@gmail.com To: tutor@python.org Subject: [Tutor] Help return a pattern from list Message-ID:

[Tutor] Suggestions for output on multiple platforms

2010-06-29 Thread Thomas C. Hicks
I am a beginner at all this and never expected to reach a point where people other than myself may have to have access to the output of one of my programs. My problem is this - I have written a program that uses xlrd to read a series of xls files and collate and summarize the data. My original

Re: [Tutor] Iterating through a list of strings

2010-05-04 Thread Thomas C. Hicks
Wow, this is great! I appreciate all the pointers, lots to keep learning here. thomas ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Iterating through a list of strings

2010-05-03 Thread Thomas C. Hicks
I am using Python 2.6.4 in Ubuntu. Since I use Ubuntu (with its every 6 months updates) and want to learn Python I have been working on a post-install script that would get my Ubuntu system up and running with my favorite packages quickly. Basically the script reads a text file, processes the