Exercises: (Mixed) List, KeyError

  1. In the interactive interpreter, create an empty list. Append to it values of types

    • Integer

    • Floatingpoint

    • Boolean

    • List

    • Tuple

    • Set

    • Dictionary

    Does it work? If yes, print the list using the print() function.

  2. Do the same in an executable Python program

  3. What happens when you access a non-existent dictionary member?

Dependencies

cluster_python Python cluster_python_basics Basics cluster_python_basics_exercises Exercises python_basics_python_0160_boolean Boolean python_basics_python_0150_datatypes_overview Datatypes python_basics_python_0160_boolean->python_basics_python_0150_datatypes_overview python_basics_python_0110_blahblah Blahblah python_basics_python_0140_variables Variables python_basics_python_0130_syntax_etc Syntax etc. python_basics_python_0140_variables->python_basics_python_0130_syntax_etc python_basics_python_0120_helloworld Hello World python_basics_python_0120_helloworld->python_basics_python_0110_blahblah python_basics_python_0150_datatypes_overview->python_basics_python_0140_variables python_basics_python_0150_datatypes_overview_compound Compound Datatypes python_basics_python_0150_datatypes_overview_compound->python_basics_python_0150_datatypes_overview python_basics_python_0130_syntax_etc->python_basics_python_0120_helloworld python_basics_exercises_mixed_list_keyerror Exercises: (Mixed) List, KeyError python_basics_exercises_mixed_list_keyerror->python_basics_python_0160_boolean python_basics_exercises_mixed_list_keyerror->python_basics_python_0140_variables python_basics_exercises_mixed_list_keyerror->python_basics_python_0120_helloworld python_basics_exercises_mixed_list_keyerror->python_basics_python_0150_datatypes_overview python_basics_exercises_mixed_list_keyerror->python_basics_python_0150_datatypes_overview_compound python_basics_exercises_mixed_list_keyerror->python_basics_python_0130_syntax_etc