Skip to content

Commit f4df2b8

Browse files
Merge pull request #2640 from LAbhilashKumar/file_handling
Added python script for reading large files
2 parents 0e80903 + 43b6c11 commit f4df2b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

large_files_reading.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
with open("new_project.txt", "r" , encoding="utf-8") as file: # replace "largefile.text" with your actual file name or with absoulte path
2+
# encoding = "utf-8" is especially used when the file contains special characters....
3+
for f in file:
4+
print(f.strip())

0 commit comments

Comments
 (0)