Subsequence Program In Python