0

What are strings

what are they use for and examples plz

4th Feb 2017, 9:40 PM
Owie Stephen
Owie Stephen - avatar
3 Answers
+ 3
a string is a series of characters. They are usually used to store messages, words, etc. Example: my_string = 'programing'
4th Feb 2017, 9:49 PM
Dylan James
Dylan James - avatar
+ 1
String is a variable type. name="Justin" country="USA" question="What is a String" a tip.. If you use input to recieve a number and then use it for an if check, for example number=input("Pick a number") number will be a string.. if number == 1: .... It will read false because it is checking a string as an integer if number == "1": .... It will as true because it is checking a string as a string Alternatively, after getting your number you can convert it to an integer number=input("Pick A number") number=int(number)
4th Feb 2017, 10:05 PM
LordHill
LordHill - avatar
+ 1
String is simply text it is considered also a character array ex: "hello world" is a string that consists of 12 characters that include space and null character at the end '\0'
4th Feb 2017, 10:52 PM
Amr Tarek Salah El-Din
Amr Tarek Salah El-Din - avatar