-
-
Save uncoded-ro/f3d02de7b2acfd76f535f30e6e2c89f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
f = open('fisier.txt', 'r') | |
except IOError: | |
print("Fisierul nu exista!") | |
else: | |
print("Fisierul a fost identificat!") | |
print("Acesta are {} linii.".format(len(f.readlines()))) | |
f.close() | |
finally: | |
print("Secventa finalizata!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment