DEV Community

Discussion on: Day 4 of 100DaysOfCode: Code to Calculate HCF Of Two Numbers

Collapse
nitinkatkam profile image
Nitin Reddy

File handling in Python is actually quite simple.

Look at this example of reading a file in 2 lines of code:

with open('myfile.txt') as myfilereader:
  txt = myfile.read()
print(txt)
Enter fullscreen mode Exit fullscreen mode

Apart from Python, Ruby is quite easy to learn and is arguably simpler.

Collapse
iamdurga profile image
Durga Pokharel Author

Really? I am learning python to understand code workflow.