Thursday, 11 September, 2025г.
russian english deutsch french spanish portuguese czech greek georgian chinese japanese korean indonesian turkish thai uzbek

пример: покупка автомобиля в Запорожье

 

Python Program - Read last n lines of a file

Python Program - Read last n lines of a fileУ вашего броузера проблема в совместимости с HTML5
In this video I will show you python script that will read last n lines of a file where in the number of lines will be specified by the user and also the file that is to be pass for reading. In this program there need to be space to distinguish between two lines if you pass a paragraph it wont work properly so take this in consideration it will work with content that is in rows and column format. As we have seen in the last video we either pass the file name or the path of the file (i.e the location where the file is stored) so even here if your file and the python script are in the same folder you can just give the file name followed by the extension ("file.txt") or else if the file is stored in some other folder just pass the path ("E:/file.txt") and take care of the slash that you use we have to use forward slash while specifying the path.
Мой аккаунт