We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c35f239 + 8eaccbc commit 0137b6eCopy full SHA for 0137b6e
replacetext.py
@@ -0,0 +1,10 @@
1
+#!/usr/bin/env python3
2
+# -*- coding: utf-8 -*-
3
+#program to replace all the spaces in an entered string with a hyphen"-"
4
+def replacetext(string):
5
+ string=string.split(" ")
6
+ string="-".join(string)
7
+ return string
8
+S=input("Enter a text to replace all its spaces with hyphens: ")
9
+N=replacetext(S)
10
+print("The changed text is: ",N)
0 commit comments