Skip to content

Commit 97cd3dc

Browse files
authored
Update strings.py
1 parent 958baec commit 97cd3dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

strings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Diving into string type data type
22
name = "CODEX"
33
print (name) # prints the whole string
4-
print (name[1]) # prints the character os specific index, here "O"
4+
print (name[1]) # prints the character at specific index, here "1"
55
print (name[1:3]) # prints the string from 1st index to 3rd i.e, 2nd character to 4th
66
print (name[1:]) # prints the whole string from 1st index i.e, 2nd character to last
77
print (name*2) # prints the string 2 times

0 commit comments

Comments
 (0)