Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Reinforce that certain types in Python such as lists are mutable while others (e.g. strings, tuples) are not. Students have difficulty tracing code that uses mutable types because they often forget this.

Share Reinforce that certain types in Python such as lists are mutable while others (e.g. strings, tuples) are not. Students have difficulty tracing code that uses mutable types because they often forget this. with FacebookShare Reinforce that certain types in Python such as lists are mutable while others (e.g. strings, tuples) are not. Students have difficulty tracing code that uses mutable types because they often forget this. with Twitter
  • It is important for students to realize that mutable types may have immutable methods. For example, the index() and count() methods are immutable list methods.

The opinions expressed are those of the Suzanne Matthews and not necessarily the position of the Army or DoD.

More about this tip

Tags

  • Python
  • Data Structures
  • Development Methods
External Source

Interview with Suzanne Matthews

Other Tips By
Other Tips By Suzanne Matthews

Similar tips

Have students develop a Java program that plots pictures in a 2D grid to practice 2D array processing with a focus on nested loops.
In anticipation of a relatively large project, assign smaller projects that include the programming concepts necessary for the large project.
Ensure young CS students check their functions with a variety of inputs, as well as with edge cases.
  • CSTT Facebook
  • CSTT Twitter

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Footer Icons by Mohammed Alyousfi. Powered by Drupal.

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College