Results for “immutable”

6 results

  1. Challenge

    Strings don't change

    code[0] = "X" stops with a TypeError, because Python strings can't be changed. Predict the crash, find out what methods and slices really give, build a new string instead, then swap a letter in the…

    Fix the code Easy 3 stages strings immutability slicing TypeError
  2. Article Python Fundamentals

    Variables and data types in Python

    …464, 15, -63] # Average temperatures in Celsius Tuples Immutable sequences, useful for storing fixed data: earth_coordinates = (0, 0, 0) # x, y, z coordinates mission_details = ("Apollo 11", 1969…

  3. Article Mini projects

    Medical dispenser - Don’t trust the user

    …it's that programmers sometimes forget that time isn't as immutable as we'd like to believe. Building Our Space Medication Dispenser Let's create a medication dispenser that would make Dr. Ryland…