Non-alphanumeric list order from os.listdir()

You can use the builtin sorted function to sort the strings however you want. Based on what you describe, sorted(os.listdir(whatever_directory)) Alternatively, you can use the .sort method of a list: lst = os.listdir(whatever_directory) lst.sort() I think should do the trick. Note that the order that os.listdir gets the filenames is probably completely dependent on your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)