python 3.x - print() inside a for loop not working -
im trying read ".xlsx" files in folder script is, when try print file names in organized form (inside loop), doesn't work... however, when run script python idle, works...
see pictures (from idle / openning ".py" file): 
see code below:
# !/usr/bin/python import time, os avaliable_xlsx = list(os.popen('dir /b /a-d *.xlsx').read().splitlines()) item in avaliable_xlsx: print('{}- {} '.format((avaliable_xlsx.index(item)+1), item), end='') #"print (avaliable_xlsx)" works!, that's not i'm trying do. time.sleep(20)

Comments
Post a Comment