Basic Pattern Question In Python