dimanche 13 janvier 2019

Check for multiple value items in a list of list in python

So what i want to do is => I have a list that contains more within it

Table=[["","",'','',''],["","",'','',''],["","",'','',''],["","",'','',''],["","",'','',''],["","",'','',''],["","",'','','']]

(this will print one under the other) i have randomly placed some values in Table and now i want to place something more but around the values that have been randomly placed .

What i mean =>

in the list i want to add 1 around the value

List= [ [ ' ',' ','1',' ',' ' ]

this will be printed under the other list of list

[ ' ','1','value','1',' ' ]

and then under the other list

[ ' ',' ','1',' ',' ' ] ]

but then i want to check for multiple values and add 1 around them too




Aucun commentaire:

Enregistrer un commentaire