Sep-27-2017, 05:53 AM
First of all, to answer the question in the thread title - yes, an int can be a key in the dict. actually any hashable object can be (e.g. tuple).
As per the problem in the thread body - post the full code (minimal runnable snippet). From what you have shown it just populates the StudentNumAndScore dict using column 2 values as key and column1 values as values in the dict.
As per the problem in the thread body - post the full code (minimal runnable snippet). From what you have shown it just populates the StudentNumAndScore dict using column 2 values as key and column1 values as values in the dict.