I have a list of strings returned after command execution, split on '\n'.
listname = output.decode('utf8').rstrip().split('\n')
When I print using print(listname)
, I get
['']
Clearly It's a list containing empty string
Because of this I am getting len(listname)
as 1.
How to remove this empty string