Initialized int being casted to list by python despite explicitly casting int

my code why is the explicitly converted int being identified as a list. Problem also exist without the explicit casting. I am not sure what the issue is. def longestSubstringWithK(full_string, k): window = {} longest_substring = 0 smallest= int(0) for index, letter in enumerate(full_string): window[letter] = index if len(window) > k: smallest = min(window.values()) del(window[full_string[smallest]])…

Details