Get the App
SLTechnology News&Howtos  ›  Servers  › 

Custom storage directory file txt, writing text and outputting text that has been entered

Shulou Source: shulou.com Published: 2022-06-03 01:57:00 09月22日 Update

DirPath = raw_input ("Input your dir path:\ n") write = raw_input ("What do you want to write? Please input here:\ n") with open (dirPath+ "testDitPath.txt", "w") as f: f.write (write) with open (dirPath+ "testDitPath.txt", "r") as r: text = r.readline () print "This is your writed:\ n", text

Tags: Text files directories storage input output Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info vpn NVidia Shulou Information MySQL