+ 1

Characters in Python?

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

12th Apr 2017, 4:07 PM
Arun
Arun - avatar
2 Answers
+ 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