+ 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!!
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
0
thank you so much!!!
- 1
x = input()
print(x[
:
])