For dictionary, I can use iter() for iterating over keys of the dictionary.
iter()
y = {\"x\":10, \"y\":20} for val in iter(y): print val
All of these work fine, except for a typo--you probably mean:
x = Counter(3,8) for i in x: print i
rather than
x = Counter(3,8) for i in x: print x