Strings and Integers | SoloLearn: Learn to code for FREE!


Strings and Integers

Are numbers (in Python) treated as integers by default, and letters treated as strings by default?

4/19/2018 6:16:49 PM


4 Answers

New Answer


Letters are treated as strings. Numbers are floats if they have a decimal point. Other numbers are integers.


Thank you all for your answers.


Yes I believe ! Unless you specify otherwise like indexing numbers in string .


integer for number _ Stringe for letters example: int B = 5 ; String A = "Steve jobs";