Комментарии:
Thank you!
ОтветитьGeorge, thank you so much. Was looking for such solution for a long time.
ОтветитьFloppy
ОтветитьThanks Bro
ОтветитьWorks like a charm! Thank you!
Ответитьthe Bob Ross of coding
ОтветитьLove how you say "I did something very naughty!" LOL! Love the way you explain, very relevant 7 years later!!!
ОтветитьI love you George! I struggle with some of these concept but you explain in a way that I can understand. Thank you!
ОтветитьYou're the best
ОтветитьThank you 😊
ОтветитьThank You! This video helps me a lot. And Your voice is soo soothing. It was pleasure to learn XD
ОтветитьGreat got some idea but could you please guide how to make dictionary of sql table ?
Ответитьnice material for my weekend studies
ОтветитьThank you! :) You explain it so well!
ОтветитьGeorge, This is late though. What if the order of the values are changed in the text file and how do you map it to the correct keys. Assuming we know the keys already.
ОтветитьOmygod THANK YOU, you saved me from a bad grade <3. I hope your channel grows a lot
Ответитьstop doing heroine dude, please...
Ответить"THAT WAS EXCITING" LOL JAJJAJAJAJAJAJA
ОтветитьLove you man, saved my day.
ОтветитьThanks very much! :)
ОтветитьThis is great, im watching this 4 years later and it helped me a lot, your voice is very soothing as well :)
Ответитьhy my teacher gave me assignment can anybody help me???????
ОтветитьAdding x[-1] = x[-1].strip() after x = line.split(',')
will also do the trick. It selects the last element in the list x and then strips off whitespace. WhiteSpace is defined as any character or series of characters that represent horizontal or vertical space in typography. When rendered, a whitespace character does not correspond to a visible mark, but typically does occupy an area on a page. Thus running strip without any parameters removes whitespace. Just another way to do the same thing.
you saved my day last night :D :D :D :D ooh thank you soo much
Ответитьthank you so much for this George!
ОтветитьSubsrcribed - First time I am actually understanding the problem sets without just the syntax interation, statements and logic practice. Hope to see network programming based off of vendors. Great Work with the naughty explainations made funny.
Ответитьthere's a much easier solution. Try using d[a]=b[:-1]
ОтветитьI keep getting the file unsupported not readable
Ответитьhow do I fix "index list out of range?"
ОтветитьThanks, you helped me with my school project
ОтветитьI did this however when i go to print(d) it seems that it's only saved the last line of the text file to the dictionary. Any ideas on how to fix this?
ОтветитьGreat example....what if you have 10 columns as a list of values mapped to the dictionary key? How would you get rid of the "\n"?
ОтветитьGeorge, thank you so much. Your videos are very simple, clear and to the point. They're becoming my favorite for python help on.
ОтветитьOr, x = line.replace("\n",",").split(","). It works too!
ОтветитьVery helpful. You have earned yourself a subscriber. Thanks so much for sharing; Jesus Christ Bless! :)
ОтветитьCan't we just add "b=x[1:-1]" at the 'b' part?
ОтветитьGeorge you can help me ,
ОтветитьThanks for the video.....
ОтветитьActually in this case the \n is on the 'b' part so just do:
b = b[:-1]
Another way to remove the \n from each line is this:
x=x[:-1]