LEN
len counts how many items is there in a list
EXAMPLE:
import os, time
listOfEmail = []
def prettyPrint():
os.system("clear")
print("listofEmail")
print()
for index in range(len(listOfEmail)): # len counts how many items in a list
print(f"{index}: {listOfEmail[index]}")
time.sleep(1)
while True:
print("SPAMMER Inc.")
menu = input("1. Add email\n2: Remove email\n3. Show emails\n4. Get SPAMMING\n> ")
if menu == "1":
email = input("Email > ")
listOfEmail.append(email)
elif menu =="2":
email = input ("Email > ")
if email in listOfEmail:
listOfEmail.remove(email)
elif menu == "3":
prettyPrint()
time.sleep(1)
os.system("clear")
Comments
Post a Comment