Bottom Page

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?
Quote
#2
you have to wrap in print unless your in the python interpreter
print(type(l))
Quote
#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
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Type hinting - return type based on parameter micseydel 2 76 Jan-14-2020, 01:20 AM
Last Post: micseydel
  Doesn't work function pyautogui.typewrite() aliyevmiras 1 118 Dec-22-2019, 11:35 AM
Last Post: aliyevmiras
  why my function doesn't work cimerio 3 157 Nov-20-2019, 01:13 PM
Last Post: ChislaineWijdeven
  Getting type from input() function in Python 3.0 leodavinci1990 7 438 Jul-29-2019, 08:28 PM
Last Post: avorane
  Should a function ever be more permissive than its type hints? Shay 1 252 Mar-13-2019, 05:36 PM
Last Post: Larz60+
  Rewrite a function to make it work with 'bottle-pymysql' nikos 1 306 Feb-26-2019, 02:59 PM
Last Post: nikos
  Why this simple function doesnt work? blackknite 8 594 Jan-05-2019, 12:32 PM
Last Post: buran
  Parameters type in a function girbinho 2 699 Oct-09-2018, 10:36 PM
Last Post: micseydel
  function type? microphone_head 3 678 Sep-13-2018, 05:44 AM
Last Post: vijayhackr
  len() function doesn't work with Geany Editor hudabaig 2 1,001 Jun-01-2018, 11:20 PM
Last Post: wavic

Forum Jump:


Users browsing this thread: 1 Guest(s)