jeudi 30 avril 2015

Python finding file path

if os.path.exists('D:\Python\New folder\'+f):
    open(f+c, 'w')

The f is a character that changes in a loop. How do i add it to the rest of the 'D:\Python\New folder\' ? What i've done above makes the whole line highlighted as a comment.

Aucun commentaire:

Enregistrer un commentaire