Colab

password = input("gimme a new password: ")
if len(password) < 4 or len(password) > 6:
    print("your password must be betweeen 4-6 letters long")
elif password.islower() or password.isupper():
    print ("use a combination of lower and upper case letters")
elif '@' not in password:
    print("must use special characters like '@'")
else:
    print("awesome password")

gimme a new password: blAH
must use special characters like '@'
a = [1,2,3,4, "blah"]

if len(a) > 0:
    print(a.pop())
else:
    print("list is empty")

blah
a.pop()

4
a = [1,2,3,4, "blah"]

while len(a) > 0:
    print(a.pop())
    
print("list is empty")

blah
4
3
2
1
list is empty
i=0
while i<10:
    print(i)
    i=i+1

0
1
2
3
4
5
6
7
8
9
for i in range(10):
    print(i)

0
1
2
3
4
5
6
7
8
9
password = ""
while True:
    password = input("Gimme password: ")
    if len(password) < 6:
        print("too short")
        continue
        
    if password.islower() or password.isupper():
        print("need combination of upper and lower case")
        continue
        
    print("awesome password")
    break

print("break was called")

Gimme password: blah
too short
import getpass


getpass.getpass("properly ask for password :")

properly ask for password :········
'very secret password'