Skip to content
Python Programming

Python Programming

  • Home
  • Blog
  • About

Month: October 2015

  • Home
  • 2015
  • Oct

Improving your code readability with namedtuples

30/10/201509/11/2015 Michael Anckaert6 Comments on Improving your code readability with namedtuples

If you’ve programmed in Python for some time you’ve no doubt used to tuples to move around data in your […]

Code Mastery, Featured readability, tuple
Date and time handling in Python using Arrow

Better date and time handling with Arrow

14/10/201509/11/2015 Michael AnckaertLeave a Comment on Better date and time handling with Arrow

In this article we’ll have a look at the Arrow library. Arrow markets itself as Better dates and times for Python. […]

Featured, General date, libraries, time
Python string formatting

String formatting like a pro

12/10/201531/05/2016 Michael Anckaert3 Comments on String formatting like a pro

Just about every Python programmer has used the ‘%’ operator for string formatting. But another formatting method is available using […]

Code Mastery, Featured string

Dictionary creation using dict comprehensions

08/10/201502/11/2015 Michael AnckaertLeave a Comment on Dictionary creation using dict comprehensions

In a previous Pythonic post we saw list comprehensions, an efficient Pythonic way to create lists.  I hope you got […]

Code Mastery dictionaries, readability

Enumerate your iterables!

08/10/201530/10/2015 Michael AnckaertLeave a Comment on Enumerate your iterables!

Whenever you write code similar to the following:

Python
1
2
3
4
index = 0
for element in my_list:
    # do something with element and index
    index += 1

you should consider making your code a bit more Python by […]

Code Mastery iterables, lists, readability

Build your lists using list comprehensions

03/10/201502/11/2015 Michael Anckaert1 Comment on Build your lists using list comprehensions

A common way to build lists in a program that we see is this construct

Python
1
2
3
squares = []
for i in range(0, 10):
    squares.append(i**2)

The basic construct here […]

Code Mastery iterables, lists, readability

Recent Posts

  • Improving your code with container methods
  • Django 1.10.3 adds important change in settings
  • Continuous delivery with Tox and Bitbucket Pipelines
  • Permission checking in Django views
  • Top Python links for May 2016

Recent Comments

  • BestGennie on Improving your code readability with namedtuples
  • LastBrianne on Django require authentication on all pages
  • Wat is Continuous Delivery - Sinax Agile Academy on Continuous delivery with Tox and Bitbucket Pipelines
  • Mats Wichmann on Improving your code with container methods
  • Doc on Komodo IDE 9.3 vs PyCharm 5

Archives

  • January 2017
  • November 2016
  • June 2016
  • May 2016
  • February 2016
  • December 2015
  • November 2015
  • October 2015

Categories

  • Code Mastery
  • Django
  • Featured
  • General
  • Python News
  • Recipes
  • Reviews
  • Testing
  • Tutorials

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Python Programming Courses

Learn all about Python programming from our python-programming.courses website!

 

Useful Links

  • Privacy Policy
  • Payment Methods
  • FAQ
  • Terms of Services

Contact Us

info@python-programming.courses

Copyright © 2018 Python Programming Theme: Flash by ThemeGrill. Proudly powered by WordPress