On Tue, Sep 6, 2016 at 1:27 AM, Smith <sm...@smith.com> wrote:
> 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")

What exactly are you expecting the 'break' to do here? Can you explain
to me the intent of your code?

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

Reply via email to