Some peaces of code in Python