We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 958baec commit 97cd3dcCopy full SHA for 97cd3dc
strings.py
@@ -1,7 +1,7 @@
1
# Diving into string type data type
2
name = "CODEX"
3
print (name) # prints the whole string
4
-print (name[1]) # prints the character os specific index, here "O"
+print (name[1]) # prints the character at specific index, here "1"
5
print (name[1:3]) # prints the string from 1st index to 3rd i.e, 2nd character to 4th
6
print (name[1:]) # prints the whole string from 1st index i.e, 2nd character to last
7
print (name*2) # prints the string 2 times
0 commit comments