Il 05/09/2016 17:27, Smith ha scritto:
Hello to all,
I wanted to know because even though the files are present on the
directory I write input gives me "file not found".
You can help me?
Thank you

a = input("Digita la directory dove vuoi trovare i file py:  ")
for file in os.listdir(a):
    if file.endswith(".py"):
        print(file)
    else:
        break
print("File not found")

sorry:

> a = input(search for files with the extension .py into directory:  ")
> for file in os.listdir(a):
>     if file.endswith(".py"):
>         print(file)
>     else:
>         break
> print("File not found")

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to