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

Force students to explore inheritance and the Java APIs for ArrayList by writing code that HAS-A ArrayList or IS-A ArrayList.
To help students formalize their knowledge of data structures, act out these abstract ideas as a class.
Have students write a program that constructs an n x n Magic Square in Java so they gain practice working with bounds in 2D arrays.

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

Privacy Policy