Skip to content

Commit 756d405

Browse files
update string practice set
1 parent 7d044ca commit 756d405

File tree

7 files changed

+60
-1
lines changed

7 files changed

+60
-1
lines changed

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/Learn-python-language.iml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

04_String/String.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,22 @@
1616
print(str1+str2) #Concatination 2 String
1717

1818
#String Indexing
19-
nam = "Dhrubaraj" #0 1 2 3 4 5 6 7 8 this is a index number
19+
a = "Dhrubaraj" #0 1 2 3 4 5 6 7 8 - this is a index number. (always 0 Start index)
20+
print(a[4])
2021
#String me Space bhi count hota he
2122

23+
#capitalize Function
24+
nam1= "Hello PYTHON" #Capitalize last Sentence
25+
out = nam1.capitalize()
26+
print(out) #Output - Hello python
2227

28+
#Replace Function
29+
b = "I am Stadying Python"
30+
print(b) #I am Stadying Python
31+
print (b.replace("Python", "Java")) #I am Stadying Java
32+
33+
#Slicing
34+
c = "Dhrubaraj Pati"
35+
print(c[10:14])
36+
print(c[5:])
37+
print(c[:14])

0 commit comments

Comments
 (0)