I know this C# code:
public class ClassA
{
public byte var1;
}
can be converted to this Python code:
class ClassA(object):
def __init__(self):
self.var1 = bytes() # or b''
but what if var1 were instead a byte array as follows:
public byte[] var1;
Normally, I would do:
[bytes(i) for i in myList]
but no such variable like myList exists in this case to fill that position, leaving me with [bytes(i) for i in ] which is obviously syntactically invalid.
Related to Mimic C# classes in Python