How to use type function in Python playground | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How to use type function in Python playground

In Python playground, type function shows error. For study purpose i need it. How to use it?

20th Jan 2022, 4:05 AM
Padmanathan N
Padmanathan N - avatar
5 Réponses
+ 2
type() function basic purpose was to return a string, representing the data type of the object given as the argument for type() function. So you need to pass that information either into a variable for later necessity, or send it to print() function to see the information. print( type( [ 1, 2, 3 ] ) ) https://www.tutorialsteacher.com/JUMP_LINK__&&__python__&&__JUMP_LINK/type-method
20th Jan 2022, 4:33 AM
Ipang
+ 1
Can you show me how you wrote it? it's a function regularly used, and there shouldn't be any problem.
20th Jan 2022, 4:08 AM
Ipang
+ 1
Thank you
20th Jan 2022, 6:03 AM
Padmanathan N
Padmanathan N - avatar
0
So how can I check Python version in play ground?
20th Jan 2022, 6:18 AM
Padmanathan N
Padmanathan N - avatar
0
Found this by searching Playground with 'python version' term https://code.sololearn.com/c20FpE7gTXze/?ref=app
20th Jan 2022, 6:49 AM
Ipang