MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / make_table

Function make_table

DemoPrograms/Demo_Table_Checkmark.py:45–50  ·  view source on GitHub ↗
(num_rows, num_cols)

Source from the content-addressed store, hash-verified

43 return random.randint(0, max_val)
44
45def make_table(num_rows, num_cols):
46 data = [[j for j in range(num_cols)] for i in range(num_rows)]
47 data[0] = [word() for __ in range(num_cols)]
48 for i in range(1, num_rows):
49 data[i] = [BLANK_BOX if random.randint(0,2) % 2 else CHECKED_BOX] + [word(), *[number() for i in range(num_cols - 1)]]
50 return data
51
52# ------ Make the Table Data ------
53data = make_table(num_rows=15, num_cols=6)

Callers 1

Calls 2

wordFunction · 0.70
numberFunction · 0.70

Tested by

no test coverage detected