Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you @themarkymark. Your tips are so great to the programming community of Steemit.

Sir I am very interested in learning programming. i know html. now I want to know python.
your post inspire me to learn it.
thank you very much sir for your valuable post.

Hi nice article.....Keep writing that's like article and let's help each other also checkout my post click here

Can you comment on when is it better to use a namedtuple vs a dictionary and vice versa?

A named tuple does not require a key and is not required to be hashable. Named tuples are ordered, unlike a dict. You can also use dot notation instead of [' '] which is a bit easier to type and has some readability improvements.

Thanks! I use python for data analysis but rarely use things like namedtuple and dictionary. By ordered I suppose you mean that if I want to, I can iterate through a namedtuple but not a dictionary?

When you use a dict, there is no guarantee you will get the keys in the order you created them. Access is typically by key so that's not important.

WIth named tuple, you know the first element, will always be returned first.

Cool! Thanks for the tips!

Thanks for this lecture on tuple. Programming is life

Congratulations @themarkymark! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments

Click on any badge to view your own Board of Honor on SteemitBoard.

To support your work, I also upvoted your post!
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

Is @upmyvote your bot ? I transfered $3 SBD before the last round ended but never got my vote. I skimmed it's recent article ( 3 months old ) and seen you replying. Sorry to hijack your topic.

Sent a refund, please use our #support on Discord in the future.

Thanks !