Wrestling Python

Wrestling Python

I’ve had a cracking day today coding Python. I’ve done a spot of recreational coding with Python before but we’ve been given a set of exercises as part of our course work to help us get up to speed quickly, and it’s been great for building my skills.

I’ve just looked through my code for the five exercises I’ve done today and I can actually see an improvement in my code between the first and the last exercise.

Some of the stuff I’ve got to grips with today has been:

  • refactoring my code to make it object-oriented,
  • organising my code into a python package (making it much more readable in the process),
  • using extended slicing with ::-1 to reverse strings (these operators are not particularly intuative at first but are pretty powerful once you get your head round them)
  • using list comprehensions to iterate and evaluate over lists (can’t say I’ve completely got my brain around these, but I’m getting there),
  • getting offay with git - I’m using it most days now and it’s becoming second nature.

One final thing. Isn’t stackoverflow just the most brilliant resource for anyone learning to code? Thank you lord, for the good people who ask stuff that I too want to know, and thank you even more for the even better people who take the time to answer them.