with open('output.txt', 'w') as f:
for item in winapps.list_installed():
print(item, file=f)
So I have this basic code. How could I make it into line? without including the with open, as other stuff is included later on.
I was thinking something like this xD
with open('output.txt', 'w') as f:
for item in winapps.list_installed(print(item, file=f))