- print(type(x))
- print(typeof(x))
- print(typeof x)
- print(typeOf(x))
Write your answer in comment
Write your answer in comment
For further actions, you may consider blocking this person and/or reporting abuse
Use any Linode offering to create something unique or silly in the DEV x Linode Hackathon 2022 and win the Wacky Wildcard category
β Join the Hackathon <-
Rahul Bagal -
Charlie Carr -
Arafat -
Sobhan Mowlaei -
Once suspended, lakshyatyagi24 will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, lakshyatyagi24 will be able to comment and publish posts again.
Once unpublished, all posts by lakshyatyagi24 will become hidden and only accessible to themselves.
If lakshyatyagi24 is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Lakshya Tyagi.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community π©βπ»π¨βπ» safe. Here is what you can do to flag lakshyatyagi24:
Unflagging lakshyatyagi24 will restore default visibility to their posts.
Top comments (9)
Well, obviously you could use
print(type(x))
, but that's not very useful, sincetype
doesn't return a string but a class, and then print will callstr()
on it, so you typically and up with therepr()
of the class:What you can do is hit the introspection bits, for example:
Which is a bit prettier.
str.join() takes exactly one argument (3 given) :)
Nice catch - I edited to pass in a tuple rather than the args directly.
Thanks for the demonstration that good code review is important!
print(type(x))
print(type(x))
1
The correct answer is the answr number one
1
print(type(x))