Scripting with Python - Modify a TXT file

preview_player
Показать описание
I use Mac Addresses as data. However, you can use any data that you need.
Hope it's useful!

📌Have some time to become better? Here're some Books I like:

🎵 How about 2 audio books for free??

🛒 How about Amazon Prime for a Month?

► Add me in social media:

►Purchases made through some Amazon links may provide some compensation to this channel.
Please use them if you are thinking of buying the product, that way you help me make more videos :)
Рекомендации по теме
Комментарии
Автор

So a faster way to do this would be to use the rstrip on the line item when you append them to the list during your initial read. So it would read like which would give you a list of items with the "\n" already stripped. Then you could just use in-place formatting instead of the for loops to replace the "-" and add the newline back. So for example, "listOfMacs = ['{0}\n'.format(element.replace("-", ":").lower()) for element in listOfMacs ]" this would give you back a list that you could just then write to the new text file. I don't know if this is more/less performant but def is less code!!

karicallegra
Автор

Oh my gosh thank you so much I had all the code written and no idea how to put it in a new file <3

ericholland_LTD
Автор

the hello it pros fot me🤣
But the rest of the vid is fire

hymavathipaladugu
Автор

hey sir, your video is totally clear. how the way you describe in every single step. very excited.!! let me to learn many thing from your youtube channel. thankyou

exonoia
Автор

How can we save data in key value type way, for example saving a conversation between two people ?

xerogaming
Автор

This video is my "GOD", thank you so much

arpsri
Автор

thanx a LOT, man. You are wizzard from other planet

CharJlJly
Автор

Great man looks like i understand all thank you so much 👌👌👌👌👌👌

tendinginfinity
Автор

Anyway to find certain address and overwrite it and save the file in question without writing to a New file ?

kristydenali
Автор

Can we use "import os" instead "with open method"?
And thanks for over simplification of these concepts

civildsimplified
Автор

how to direct send export data in text.txt in python

u.mcrafts
Автор

I want you to share a video about Cisco Serial port(COM) connection.
please

sametozver
Автор

Very helpful, but the intro gave me a heart attack.

pamir
Автор

Thanks its really useful for me. Can you plz help me to find out how to transpose text file in python ?

farihamorshed
Автор

5:00 "So now that I have a girlfriend, I have to do something with it"

DJFAization
join shbcf.ru