windows how to store filepath as variabley python

Solutions on MaxInterview for windows how to store filepath as variabley python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "windows how to store filepath as variabley python"
Simone
15 Oct 2019
1from pathlib import Path
2
3docs_folder = Path("some_folder/some_folder/")
4text_file = docs_folder / "some_file.txt"
5f = open(text_file)
6
7#note must use forward slashes as pathlib will convert these to \\ for windows