Profile photo for Akella Srikanth
  1. def out_fun(): 
  2. return "Hello World" 
  3. output = out_fun() 
  4. file = open("sample.txt","w") 
  5. file.write(output) 
  6. file.close() 
  7. #Copy and paste...will work. 
View 6 other answers to this question
About · Careers · Privacy · Terms · Contact · Languages · Your Ad Choices · Press ·
© Quora, Inc. 2025