0

What is string in Python?

What's string in Python?

14th Oct 2024, 2:09 AM
niyi olurinde
niyi olurinde - avatar
2 Réponses
+ 5
A string is anything between " ". It is considered as text, even if it's a number. name = "Jerry" Even if it's numbers, but they are between " ", then it's a string. "1234" is not the same as 1234. 1234 is a number. "1234" is a string which happens to have number characters in the string. A string is text.
14th Oct 2024, 2:16 AM
Jerry Hobby
Jerry Hobby - avatar
+ 1
Like every program language,string is a famous data type. Mostly represents text,and for the computer it is just a text. The python string must be written between two " like "Storm" or even "5"
15th Oct 2024, 6:14 PM
Mehdi Eslami
Mehdi Eslami - avatar