Python Forum

Full Version: Type function does not work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
l=["Red", "Blue","Green","Orange","Violet"]

for c in l:
    print(c)

type(l)
In this code type function does not showing the answer. Why so?
you have to wrap in print unless your in the python interpreter
print(type(l))
(Mar-15-2019, 10:44 AM)metulburr Wrote: [ -> ]you have to wrap in print unless your in the python interpreter
print(type(l))

Thanks !

Sir, C will be a variable when using in for loop