For loop exercise in python

 # WRITE A PROGRAM :

# IN WHICH THE PROGRAM TAKE THE VALUE FROM THE LIST AND PRINT
#  IF THE VALUE IS ONLY NUMBER OR GREATER THEN 6



mylist = []
user =str(input("Enter the Values to enter in the list: "))
ans=mylist.append(user) 
true = user.isnumeric() 
if  true == bool("True"):
    if int(user)>6:
        print("""Your Entered a numeriv number...\n","The number
         you Enter is greater then 6: """,mylist[0]) 
    else:
        print("The number you entered is less then 6")
else:
    print("Only numbers are allowd")




mylst = []
user=input("Enter the value: ")
mylst.append(user)
for items in mylst:
    if type(items)==int:
        print("Numeric Numbers in Int datatype in list: ",items)
    elif items.isnumeric():
        print("Numeric Numbers in string list",items)
    else:
        print("Pure text Values in list: ",items)



Comments