I want to remove all the spaces in the words list.
words = ['', 'int', '', 'main', '', '', '', '', '', '', 'return', '0', '']
for i in words:
words.remove('')
print(words)
but this prints
['int', 'main', '', 'return', '0', '']
I want ['int', 'main', 'return', '0']
as the out put.
I am using Python3.