34.5k views
1 vote
Complete the code to check whether a string contains at least one lowercase letter.

valid = False
pw = input("Enter a password: ")
if _ (letter. _ () for letter in pw):
valid = True

1. any
2. some
3. islower
4. isLower

User Stueynet
by
7.4k points

2 Answers

2 votes

Answer:

any, islower

Step-by-step explanation:

Complete the code to check whether a string contains at least one lowercase letter-example-1
User Vaman Kulkarni
by
7.9k points
2 votes

Answer:

3 islower

Step-by-step explanation:

The correct code to check whether a string contains at least one lowercase letter is:

valid = False

pw = input("Enter a password: ")

if any(letter.islower() for letter in pw):

valid = True

User StaticVoid
by
8.5k points