Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Type function does not work
#1
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?
Reply
#2
you have to wrap in print unless your in the python interpreter
print(type(l))
Recommended Tutorials:
Reply
#3
(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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  print doesnt work in a function ony 2 232 Mar-11-2024, 12:42 PM
Last Post: Pedroski55
  determine parameter type in definition function akbarza 1 550 Aug-24-2023, 01:46 PM
Last Post: deanhystad
  I dont know why my function won't work? MehHz2526 3 1,149 Nov-28-2022, 09:32 PM
Last Post: deanhystad
  i want to use type= as a function/method keyword argument Skaperen 9 1,771 Nov-06-2022, 04:28 AM
Last Post: Skaperen
  match type with value in csv parsing function vinci 2 1,268 Jan-21-2022, 12:19 PM
Last Post: Larz60+
  time function does not work tester_V 4 2,945 Oct-17-2021, 05:48 PM
Last Post: tester_V
  write new function or change the old one to work "smartter? korenron 3 1,924 Aug-09-2021, 10:36 AM
Last Post: jamesaarr
  string function doesn't work in script ClockPillow 3 2,331 Jul-13-2021, 02:47 PM
Last Post: deanhystad
  Why does unpickling only work ouside of a function? pjfarley3 5 3,363 Dec-24-2020, 08:31 AM
Last Post: pjfarley3
  tmdbsimple content type? How to work with it? pythonnewbie138 1 1,416 Aug-01-2020, 08:18 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020