The Problem When coding in Python, we need a way to store configurations and settings in a file, then be able to access them in the code. Our requirements for accessing these settings are: Simple to learn and use — We would like to target novice coders Easy to understand Hierarchical of settings References ConfigParserShootout […]
April 7, 2011
The Problem Given a year and a month, I want to determine the last day of that month. For example, if the year is 2004 and the month is 2, then the last day is 29th because of leap year. The Solution Calculating the last day of a month is not hard, but complicated by […]
January 11, 2011
The Problem In Python, the assignment operator (=) assign the reference to the list instead of making copy of it. The following interaction will demonstrate this concept: In line 1, we create a new list, original, with three elements. In line 2, we assign this list to a new variable, reference. In line 5, we […]
October 13, 2011
2