Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dictionary
#3
if the user wants to largen the list size
d = {}
L = []
i = 0

while i < 3:
  
  
  name = input('Enter your Name  :')
  for j in range(5):          #changing the lenght of the list
    integer = eval(input('Input your value :'))

  
    L.append(integer) 
    d[name] = L
    
    
  L = []
  print(i)  
  i+=1
  
print(d)
Reply


Messages In This Thread
dictionary - by garikhgh0 - Feb-06-2018, 05:43 AM
RE: dictionary - by gjenkinslb - Feb-06-2018, 07:19 AM
RE: dictionary - by garikhgh0 - Feb-06-2018, 07:41 AM
RE: dictionary - by buran - Feb-06-2018, 07:47 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020