Enthernet Code
Enthernet Code
DIIDevHeads IoT Integration Server
Created by Boss lady on 6/25/2024 in #middleware-and-os
change the priority of a task in FreeRTOS at runtime using STM32CubeIDE and STM32 HAL libraries
If you table is in a form of matrix u can use the example below 👇
# replace with your 2d table 👇
lookup_table = [
[10, 20, 30],
[40, 50, 60],
[70, 80, 90]
]

(transpose) the table
def invert_table(table):
return [list(row) for row in zip(*table)]

inverted_table = invert_table(lookup_table)

print("Original Table:")
for row in lookup_table:
print(row)

print("\n")

print("Inverted Table:")
for row in inverted_table:
print(row)
# replace with your 2d table 👇
lookup_table = [
[10, 20, 30],
[40, 50, 60],
[70, 80, 90]
]

(transpose) the table
def invert_table(table):
return [list(row) for row in zip(*table)]

inverted_table = invert_table(lookup_table)

print("Original Table:")
for row in lookup_table:
print(row)

print("\n")

print("Inverted Table:")
for row in inverted_table:
print(row)
5 replies