mirror of
https://github.com/DavidGailleton/42-Piscine_Python.git
synced 2026-03-13 20:56:54 +01:00
04/ex0
This commit is contained in:
15
04/ex0/ft_ancient_text.py
Normal file
15
04/ex0/ft_ancient_text.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
def read_ancient_text() -> None:
|
||||||
|
try:
|
||||||
|
print("Accessing Storage Vault: ancient_fragment.txt")
|
||||||
|
vault = open("ancient_fragment.txt", "r")
|
||||||
|
print("Connection establish...")
|
||||||
|
print("\nRECOVERED DATA:")
|
||||||
|
print(vault.read())
|
||||||
|
vault.close()
|
||||||
|
print("\nData recovery complete. Storage unit disconnected.")
|
||||||
|
except FileNotFoundError:
|
||||||
|
print("ERROR: Storage vault not found.")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
read_ancient_text()
|
||||||
Reference in New Issue
Block a user