Introduction to Programming with Python: Reading Data from a File

Опубликовано: 30 Июнь 2022
на канале: Gina Sprint
355
4

This video provides examples of reading data from a file in Python. Specifically, it shows how to open a CSV (comma separated value) file, process its contents, and close the file. The following topics are covered when processing the file contents:
-Read all lines from a file
-Iterate through the file lines
-Split each line into its individual values by using string split() with the comma delimiter
-Store the values in a table format using a 2D list
-Convert the numeric values from string to a numeric type like int or float

This video is the twelfth video in a multi-part series on getting started with the Python programming language. Next video in the series on writing files:    • Introduction to Programming with Pyth...  

Source code on Github: https://github.com/gsprint23/Python-D...


Смотрите видео Introduction to Programming with Python: Reading Data from a File онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Gina Sprint 30 Июнь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 355 раз и оно понравилось 4 людям.