From 0114a74db2166bf239b35cc02ed3d2b434adbc50 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Sat, 13 Jun 2020 10:09:01 +1000 Subject: [PATCH] Update python.md --- python.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python.md b/python.md index 852c8a0f4..813a88801 100644 --- a/python.md +++ b/python.md @@ -121,8 +121,9 @@ category: Python ```py file = open("hello.txt", "r") # open in read mode 'r' file.close() +``` ---- +```py print(file.read()) # read the entire file and set the cursor at the end of file print file.readline() # Reading one line file.seek(0, 0) # place the cursor at the beggining of the file