Rashina
asked

Expert
Sarthak Baral answered
Hi Rashina,
In Python, you can check this using isinstance():
value = "Hello"
if isinstance(value, str):
print("It is a string")
else:
print("It is not a string")
Just replace value with the variable you want to test.
If you have more questions, I am here to help π
Python
This question was asked as part of the Number Guessing Game course.








