Curso_Intensivo_de_PYTHON/chapter_10/pi_string.py
2023-06-02 17:22:53 +02:00

11 lines
230 B
Python

filename = 'pi_million_digits.txt'
with open(filename) as file_object:
lines = file_object.readlines()
pi_string = ''
for line in lines:
pi_string += line.strip()
print(f"{pi_string[:52]}...")
print(len(pi_string))