Practical code while learning Python