+ 3

Python Module 5 Quizz- help

Hi there! I´m completely stuck at this question. Any ideas? Thank you!! try: [complete here*] open("test.txt") as f: print(f.read()) except: print("Error") * I´ve tried file= but nothing. I understand it should be the structure of "something="? Thank you!!

14th Dec 2020, 10:09 PM
Sol Wei
Sol Wei - avatar
3 odpowiedzi
+ 2
The answer is this: try: with open("test.txt") as f: print(f.read()) except: print("Error") The word "with" is the answer. The word "with" is the answer because you had to create a temporary variable. (SoloLearn said this in one of their lessons.) Maybe you should review this lesson: https://www.sololearn.com/learning/1073/2448/5060/1
14th Dec 2020, 10:32 PM
:DD
:DD - avatar
0
thank you so much!!!
14th Dec 2020, 10:47 PM
Sol Wei
Sol Wei - avatar
- 1
x = input() print(x[ : ])
1st Mar 2021, 6:06 AM
Dinesh babu03
Dinesh babu03 - avatar