+ 2
What is a string? Pls don't explain in the application's way because I didn't understand it
11 Antworten
+ 2
Craftspeople making necklaces might string beads. The start (or reference) bead can be bigger than the other beads. They follow each other, one-by-one as a string of beads.
Print 'letters of the alphabet' on the beads. Maybe the big one is uppercase.
Now their order (arrangement) has become important. You can allow numbers, punctuation, spaces and other text.
It would be weird to try to "add" beads just because they have numbers on them; you need the numbers themselves. The only way to reliably get a number from beads with numbers on them is if the number represented is good. Then you can add the represented values.
The string itself (that the beads are strung onto) is the available space (like computer memory). The arrangement is something with a count (length, number of beads) that takes up some of that space...like a number of bytes.
Usually one byte per character is enough. A multibyte string simply represents what used to take one bead(byte) with more than one.
----(H)(o)(p)(e)---- that helps.
+ 2
String is simply the character array which includes the combinations of A-Z , a-z, all special characters and digits and it its written between " " . For example, name , address, or anything like that is called string
+ 2
@De nomano yes you are right. any sentence or word between quotation is a string.
its a collection of words including symbols and numbers.
+ 1
yeah. you have added parentheses to a string.
+ 1
Adding to: "Do you mean that whatever is quoted is a string?"
In Python that's one of the delimiters. The "no technical difference" between double (") and single (') helps them mix to avoid accidents:
"This text string's got an apostrophe"
'This one has doubles "inside".'
instead of:
"This isn't very \"readable\"."
'This one\'s not as readable either.'
Understanding strings alone (how your question read to me) is relevant to Python and additional concepts via convention:
http://programmers.stackexchange.com/a/155188
also from:
https://en.m.wikipedia.org/wiki/String_literal
"... in Python, raw strings are preceded by an r or R...Python 2 also distinguishes two types of strings...explicitly indicated [using b/B or u/U]" and docstrings start+end with """. They're all string literals.
+ 1
a string is a series of letter (consist of all writable characters) that are consecutive. you use string for write words or sentences. you have to always sorrounded the string with double quote or single quote. you also need to know wich especials characters have to scape.
0
it's an item you can list. List items are strings. Strings are words in citation marks. "string" is a string. "Bob" is a string. "cat" is a string. when you advance, you will know how to manipulate strings.
0
Do you mean whatever is quoted is a string?For eg("xyz") is a string.
0
Strings are simply some characters like a B cr then can also be 1 2 3 but then should be in double codes
0
A string is any combination of letters from a-z
0
string is just a collection of characters