Oh my gosh thank you so much I had all the code written and no idea how to put it in a new file
@karicallegra81943 жыл бұрын
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 "listOfMacs.append(line.rstrip())" which would give you a list of items with the " " 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} '.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!!
@1staryelpreview6893 жыл бұрын
I would assume it is more performant because it uses less for loops: with open(path_to_mac_list,"r") as reader: list_of_macs=[] for line in reader.readlines(): list_of_macs.append(line.rstrip(" ")) list_of_macs = ['{0}'.format(element.replace("-", ":").lower()) for element in list_of_macs] You could even do something like this: with open(path_to_mac_list,"r") as reader: list_of_macs=[] for line in reader.readlines(): list_of_macs.append(line.rstrip(" ").replace("-", ":").lower())
@exonoia3 жыл бұрын
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
@arpsri967510 ай бұрын
This video is my "GOD" , thank you so much
@hymavathipaladugu44043 ай бұрын
the hello it pros fot me🤣 But the rest of the vid is fire
@CharJlJly2 жыл бұрын
thanx a LOT, man. You are wizzard from other planet
@eliehaddad842 жыл бұрын
Extreme good explanation 👍🏼
@shrikantagashe94492 жыл бұрын
Thank you man for saving my day 🙌🙌
@manishmurari64943 жыл бұрын
Explained really good...thank you
@maxwellsalmon51603 жыл бұрын
Legend, thank you.
@debanjansen12823 жыл бұрын
Extremely good tutorial
@tendinginfinity3 жыл бұрын
Great man looks like i understand all thank you so much 👌👌👌👌👌👌
@xerogaming21273 жыл бұрын
How can we save data in key value type way , for example saving a conversation between two people ?
@kristydenali21852 жыл бұрын
Anyway to find certain address and overwrite it and save the file in question without writing to a New file ?
@Kalexx462 жыл бұрын
My hero :)
@asands1233 жыл бұрын
You sound like Dracula. Cool.
@MyITWorkshop3 жыл бұрын
Thanks, it’s nice to get some appreciation around here. 😀
@jadkhalil9263 Жыл бұрын
Thanks very good video
@lazarboti46793 жыл бұрын
you are smart thank you
@pamir83373 жыл бұрын
Very helpful, but the intro gave me a heart attack.
@farihamorshed22322 жыл бұрын
Thanks its really useful for me. Can you plz help me to find out how to transpose text file in python ?
@civil3dsimplified642 жыл бұрын
Can we use "import os" instead "with open method"? And thanks for over simplification of these concepts
@philtoa3343 жыл бұрын
yes , thanks.
@mohamdkazm5763 жыл бұрын
Thank you very much
@sametozver3 жыл бұрын
I want you to share a video about Cisco Serial port(COM) connection. please
@MyITWorkshop3 жыл бұрын
Hello, I did a video in the past where reset the password for a Cisco switch. The way I connected to the device was using a serial port on the switch: kzbin.info/www/bejne/eYvdomSsh6iKb5o Hope it helps Thanks for the comment!
@sametozver3 жыл бұрын
@@MyITWorkshop Hİ, Can you make a serial connection video in python for "cisco switch"? ** cisco switch serial connection (COM) for just console cable ==> python connection code ** python connection code ==> cisco switch command
@saqibjaseem19573 жыл бұрын
how to modify user input text
@u.mcrafts17143 жыл бұрын
how to direct send export data in text.txt in python
@thakurharsh47703 жыл бұрын
Nice Bro
@DJFAization3 жыл бұрын
5:00 "So now that I have a girlfriend, I have to do something with it"