[Tutor] List Comprehension Syntax

2012-12-22 Thread Mario Cacciatore
Hey everyone,

I am having a very hard time understanding the list comprehension syntax. I've 
followed the docs and could use some guidance from the fine folks here to 
supplement my findings. If someone wouldn't mind replying back with an example 
or two, with some explanation of each part I'd appreciate it. ___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Hello Python Tutor - help please!

2012-08-22 Thread Mario Cacciatore
Hello,

My highest recommendation for you is to start with a simple hello world
program. Study that program, each line. Think about how and most
importantly, why it works.

Then, extend on it. Make it write to a file instead of a terminal. Then
make it read from a file and print to the terminal. Then make it print one
letter to each file, then read them back in and reconstruct the sentence.

Just take it slow, and one step at a time. So many times people simply go
for complex solutions and get lost in the complexity.

Sorry for top posting. My phone client doesn't support inline replies.

-Mario
--
From: Cecilia Chavana-Bryant
Sent: 8/22/2012 6:35 AM
To: tutor@python.org
Subject: [Tutor] Hello Python Tutor - help please!

   Dear all,

 I am just returning to my doctoral studies after a 7-month medical leave
and desperately trying to catch up for lost time. I am COMPLETELY new to
programming, well, I did try learning C for 3 weeks 3 yrs ago (with very
little success) but had to stop and then spent 2 years in the Amazon
climbing trees (lots more enjoyable than learning to programme!) and
collecting loads of field data that I now need to post-process and analyse.
By the way, the 3 weeks I spent trying to learn C really ended up being
spent trying to get to grips with using a terminal for the first time in my
life.

 Since getting back to work, I was advised to try learning Python instead
of C as it is a much easier first language to learn. I have been trying,
but again, to not great success. I started following A Primer on
Scientific programming with Python but I kept getting lost and stuck,
specially on the exercises. I have also been advised that I should not try
to learn programming by following guides but by trying to write the
programmes I need to analyse my data. Although I can understand the logic
behind this last bit of advise (it gives context and direction to the
learning process) I have also gotten stuck trying this approach as I do
not know how to programme!. Thus, I was hoping that some of you can
remember how you got started and point me towards any really good
interactive learning guides/materials and/or have a good learning strategy
for a complete beginner. I have searched the web and was overwhelmed by
choice of tutorials and guides. I have skimmed through a couple of
tutorials but then fail to see how all that relates to my own work and I
get stuck with what seems like basic important concepts so I don't
progress. I then think I should try to make some progress with my own data
analysing and go back to trying to learn to write a programme for my
specific needs and get stuck again because this requires more advanced
skills then the basic programming concepts I have been reading about on the
learning guides. So, I am now feeling VERY frustrated and have no idea what
on Earth I am doing! Can anyone please offer guidance in my learning
process? I don't know how and what I should be spending my time learning
first and/or if I should focus my learning towards the skill areas I will
require to write my specific programmes, although I have no idea what these
are. I would like advise on finding some really good interactive(let you
know if your solution to an exercise is correct or not) and or video
tutorials that give you feedback on the solutions you write to exercises.

 Many thanks in advance for all your help, it will be much appreciated!



Cecilia Chavana-Bryant
DPhil Candidate - Remote sensing and tropical phenology
Environmental Change Institute
School of Geography and the Environment
University of Oxford
South Parks Road, Oxford, OX1 3QY
Web: http://www.eci.ox.ac.uk/teaching/doctoral/chavanabryantcecilia.php
Tel Direct: +44 (0)1865 275861
Fax: +44 (0)1865 275885
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor