- 1

I am confused about the strings concept can anyone care to explain for me thank you

13th Jul 2016, 6:11 PM
Abdirahman
2 odpowiedzi
0
strings are group of characters example "hello" it is a data type in python data types are considered as numbers (integer,float) strings(characters) when we mention numbers anywhere in the code it would automatically taken as number data type, when you need to give a string you must "use quotes" this is to identify the data type is strings in this below example X="5" Y="5" where 5 is a number but when u declared 5 within quotes it acts as a string I mean as a character so when u add both X+Y u can see "55" instead of 10 this shows the data type changed as character so it's concatinating(adding strings) instead of adding numbers
13th Jul 2016, 6:51 PM
sundar
sundar - avatar
- 1
thanks
13th Jul 2016, 6:52 PM
Abdirahman