Q:

python list not getting appended

The list is not getting appended I want to append board list for both users using for loop how can I do this
from random import randint
user1 = {
    "name":input("Enter your name"),
    "board":[]
}
user2 = {
    "name":input("Enter your name"),
    "board":[]
}
users = [user1, user2]
def set_board(users):
    for x in range(5):
        users["board"].append(x)
def print_board(users):
    for row in users["board"]:
        print(" ".join(row))
print("Let's start")
print(print_board(user1))
print(print_board(user2))

A:

You never call set_board
print_board don't return anything, so you cannot print the return value
You are trying to set a dict key for every element in a list, this is not possible.

Here is a working version:
from random import randint
user1 = {
    "name":input("Enter your name"),
    "board":[]
}
user2 = {
    "name":input("Enter your name"),
    "board":[]
}
users = [user1, user2]    # Actually this is not used anymore

def set_board(user):
    for x in range(5):
        user["board"].append(x)

def print_board(user):
    print(' '.join(str(user["board"])))

print("Let's start")
set_board(user1)
set_board(user2)
print_board(user1)
print_board(user2)

