Hint: You can adjust the default video playback speed in your account settings.

Immutable Data Structures: namedtuple

Give Feedback

In this lesson, you’ll see some of the problems you could run into if you use mutable data structures to store your data set. Then, you’ll see how you can approach this data set with immutable data sctrutures.

You’ll learn how you can use .namedtuple() from the collections module, which is built into Python, in order to represent your data in an immutable data structure so it can’t be modified in-place.

Comments & Discussion

MrMaul on Dec. 7, 2019

Which editor is being used in the video?

B S K Karthik on Feb. 27, 2020

Which IDE/Command prompt have you used.Can you please tell me.It looks good.

Dan Bader RP Team on Feb. 27, 2020

I’m using an alternative Python REPL called bpython in my videos. You can learn more about it here: bpython-interpreter.org

B S K Karthik on Feb. 28, 2020

Thank you

Lokman on March 26, 2020

Hi @Dan Bader, just wanna correct your article above collection.namedtulple to collection.namedtuple.

Dan Bader RP Team on March 27, 2020

Thanks for catching my typo there, should be fixed now :)

elliekafubu on March 28, 2020

is it possible to have a pdf of these wonderful lessons?

Choong Han on March 31, 2020

Hey, in the namedtuple function, what does the first index, scienctist represent

Become a Member to join the conversation.