I didnt get the NULL values - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: I didnt get the NULL values (/thread-28234.html) |
I didnt get the NULL values - salwa17 - Jul-10-2020 I want to extract the segment len from a TCP header so I made this code: def tcp_len_list(s): a = [len(p[TCP].payload) if p.haslayer(TCP) else None for p in s] return aThe problem is that extracts all values except 0 Any idea ? |