Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
in Python by (50.2k points)

I am having some information in my variables. I have stored character type data, when I checked the type of that variable, it is coming as str:

Please see my input and output.

Input:

a = 'c'

type(a)

Output:

class 'str'

1 Answer

0 votes
by (107k points)

Please be informed that Python does not have a character or char data type. All single characters are strings with length one.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...