Conversation
|
strings intro |
Chovin
left a comment
There was a problem hiding this comment.
Hi @niv789 , thanks for the contribution!
Could you change a few things before I merge it though? I notice you put every paragraph in its own
```
code block
```
This kind of makes it hard to read and may make people confused since only code was in code blocks in the rest of the page. It also stops the "Go back" link from working.
I like that you're going a bit deeper in depth! This page had only briefly skimmed Strings before. It did however suggest some of the things you've mentioned in these changes. Could you move this section up nearer to where strings are talked about? That way it may be more obvious that you're expounding on those ideas.
| ``` | ||
| ``` | ||
| Python String | ||
| In Python, Strings are arrays of bytes representing Unicode characters. However, Python does not have a character data type, a single character is simply a string with a length of 1. Square brackets can be used to access elements of the string. |
There was a problem hiding this comment.
Could you provide an example of using square brackets to access elements of a string? Also, maybe change "elements" to something else, something that makes sense that the elements you're accessing are either single characters or substrings.. "P
| print("\nString with the use of Double Quotes: ") | ||
| print(String1) | ||
| ``` Creating a String with triple Quotes ``` | ||
| String1 = '''I'm a Geek and I live in a world of "Geeks"''' |
There was a problem hiding this comment.
maybe it's important to mention why you might use these different ways of writing strings, like to avoid escaping the other set of quotes like you've demonstrated here.
| String1 = '''Geeks | ||
| For | ||
| Life''' |
There was a problem hiding this comment.
could you also mention that using three double quotes works as well?
No description provided.