Is there anyway to support structures in python and does it not support the normal keyword struct?
for eg:
struct node
{
unsigned dist[20];
unsigned from[20];
}rt[10];
How can i covert this into a python struct?
I think the Python's equivalent to C-structs is classes:
class Node:
def __init__(self):
self.dist_ = []
self.from_ = []
rt = []
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With