Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create a number of variables based on input in python

from collections import defaultdict
d = defaultdict(int)

d = {}

players = raw_input('How many players?')
players = int(players)

for i in range (1,players+1):
  d = raw_input('Enter player name')

print d
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #number #variables #based #input #python
ADD COMMENT
Topic
Name
3+2 =