+ 1

how to create lists automatically? Python

create list1 list2 list3 ... but think of themselves

19th Jun 2018, 1:02 AM
Angel Vidal
Angel Vidal - avatar
5 ответов
0
n = int(input()) for i in range(1, n+1): exec("lst{} = [] ".format(n)) #To create n empty lists with name lst"n"
19th Jun 2018, 4:36 AM
李立威
+ 4
x='Hello' print(list(x)) #output=['H','e','l','l','o']
19th Jun 2018, 2:44 AM
Maninder $ingh
Maninder $ingh - avatar
+ 1
hey, can you please explain you question a bit more? for which language?
19th Jun 2018, 1:56 AM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar
0
python sorry
19th Jun 2018, 2:02 AM
Angel Vidal
Angel Vidal - avatar
0
for now they are just empty lists
19th Jun 2018, 2:20 AM
Angel Vidal
Angel Vidal - avatar