Untitled

 avatar
unknown
python
a year ago
292 B
6
Indexable
if __name__ == '__main__':
    file = open('data/dane.txt', 'r', encoding='utf-8')
    x = file.readlines()        # Odczytanie wszystkich linii i zapisanie ich w liście (zmiennej) x
    print(x[2])                 # Wyświetlenie zawartości 3 elementu (index 2, numerujemy od 0) listy
Editor is loading...
Leave a Comment