generic python practice code