Characters in Python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Characters in Python?

Im coming from java background, How to declare a character in Python?

12th Apr 2017, 4:07 PM
Arun - avatar
1 Answer
+ 2
You'll have less hassle with Python :) Python ist strongly typed, but dynamic: there is no need to provide a data type for your variables. Moreover, it does not make ay difference whether you write a = 'X' or # one letter variables are a bad idea ;-) b = "X" type(a) # gives str type(b) # gives str too
12th Apr 2017, 4:25 PM
Klaus-Dieter Warzecha
Klaus-Dieter Warzecha - avatar