How do I get past IndentationError with try and except in a for loop in Python? : given_items = ["one", "two", 3, 4, "five", ["six", "seven", "eight"]]
for item in given_items:
    try:
        for element in item:
        
    except TypeError:
            pass
    else:
        print(element)

prints:
o
n
e
t
w
o (Vertically)

then line 6 (for element in item) crashes the program with a 'gives a IndentationError: expected an indented block' on reaching 3 in the list.  The object of the program is catch items that cannot be iterated and print the rest.  How do I get past this error?  Thanks in advance.


