Your current code fails because you keep resetting v
and v1
to an empty list every time you pick a new letter. You can do this more directly with list comprehensions:
v = [char for char in s if char.islower()]
v1 = [char for char in s if char.isupper()]
However, since what you really want is the count, simply add the Boolean values (which are True = 1 and False = 0)
len_lower = sum(char.islower() for char in s)
len_upper = sum(char.isupper() for char in s)
... and there are your two values to return
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…