Answers for "list inside a list in python"

1

a list inside a list python

board = []    
for i in range(6): # create a list with nested lists
    board.append([])
    for n in range(6):
        board[i].append("O") # fills nested lists with data
Posted by: Guest on April-28-2020
1

list inside a list in python

# it appends a list into a list
list1 = [1,2,3,4,5]
list1.append([6,7])
# ouput = [1, 2, 3, 4, 5, [6, 7]]
Posted by: Guest on May-14-2020
0

list inside of list

board = []    
for i in range(6): # create a list with nested lists
    board.append([])
    for n in range(6):
        board[i].append("O") # fills nested lists with data
Posted by: Guest on May-07-2021

Code answers related to "list inside a list in python"

Python Answers by Framework

Browse Popular Code Answers by Language