For loop in python

 userlist=["Umair","Awais","Umer","Sami"]




for items in userlist:
    # print("New Facebook Users:",items)



# HOW TO PRINT TABEL VALES WITH FOR LOOP

 userlists=[ ["Umair",322] ,  ["Awais",12],  ["Umer",43],  ["Sami",32]  ]

dic = dict(userlists)
print(dic)



# for items,vales in userlists:
#   print(items,vales)


for keys,values in dic.items(): 
    print(keys, values)



# for take the whole list as input from the user we use this

mylist = []
= int(input("Enter the range of the numbers: "))

for x in range(x): 
    user = input()
    mylist.append(user)
    
for items in mylist:
    print(f" You Enter: {items}" ,end="")


Comments