just to mention that brackets in your if/elif/else conditions are redundant
if self.cmd[1] in {"S","D","R","W","T"}: k = 8 elif self.cmd[1] in {"F","A"}: k = 10 elif self.cmd[1] == "C": k = input("Enter the number of bytes? ") else: k = 0 if k:
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs