Remove the spaces in String python
python program to get a String and remove the spaces
Sample Input 1:
Hello World
Sample Output 1 :
HelloWorld
Program or Solution
s1=input("Enter a String:")
s2=""
for i in s1:
if(i!=" "):
s2+=i
s1=s2
print(s1)
Program Explanation
visit each location in string s1, if charcter in the location is not a space then append it in s2, finally store s2 in s1. Note: String is immutable, so you cannot modify a character directly in a orginal string.Comments
ubaTaeCJ
-1 OR 2+465-465-1=0+0+0+1 --ubaTaeCJ
-1 OR 3+465-465-1=0+0+0+1 --ubaTaeCJ
-1 OR 3*2<(0+5+465-465) --ubaTaeCJ
-1 OR 3*2>(0+5+465-465) --ubaTaeCJ
-1 OR 2+991-991-1=0+0+0+1ubaTaeCJ
-1 OR 3+991-991-1=0+0+0+1ubaTaeCJ
-1 OR 3*2<(0+5+991-991)ubaTaeCJ
-1 OR 3*2>(0+5+991-991)ubaTaeCJ
-1' OR 2+897-897-1=0+0+0+1 --ubaTaeCJ
-1' OR 3+897-897-1=0+0+0+1 --ubaTaeCJ
-1' OR 3*2<(0+5+897-897) --ubaTaeCJ
-1' OR 3*2>(0+5+897-897) --ubaTaeCJ
-1' OR 2+755-755-1=0+0+0+1 or 'Hz8lCbzi'='ubaTaeCJ
-1' OR 3+755-755-1=0+0+0+1 or 'Hz8lCbzi'='ubaTaeCJ
-1' OR 3*2<(0+5+755-755) or 'Hz8lCbzi'='ubaTaeCJ
-1' OR 3*2>(0+5+755-755) or 'Hz8lCbzi'='ubaTaeCJ
-1" OR 2+602-602-1=0+0+0+1 --ubaTaeCJ
-1" OR 3+602-602-1=0+0+0+1 --ubaTaeCJ
-1" OR 3*2<(0+5+602-602) --ubaTaeCJ
-1" OR 3*2>(0+5+602-602) --ubaTaeCJ
if(now()=sysdate(),sleep(15),0)ubaTaeCJ
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'ZubaTaeCJ
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"ZubaTaeCJ
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/ubaTaeCJ
-1; waitfor delay '0:0:15' --ubaTaeCJ
-1); waitfor delay '0:0:15' --ubaTaeCJ
1 waitfor delay '0:0:15' --ubaTaeCJ
zTBqCQNN'; waitfor delay '0:0:15' --ubaTaeCJ
-5 OR 634=(SELECT 634 FROM PG_SLEEP(15))--ubaTaeCJ
-5) OR 168=(SELECT 168 FROM PG_SLEEP(15))--ubaTaeCJ
-1)) OR 451=(SELECT 451 FROM PG_SLEEP(15))--ubaTaeCJ
WQMTg3IZ' OR 110=(SELECT 110 FROM PG_SLEEP(15))--ubaTaeCJ
zbpn7PzI') OR 296=(SELECT 296 FROM PG_SLEEP(15))--ubaTaeCJ
rpcuuQJP')) OR 491=(SELECT 491 FROM PG_SLEEP(15))--ubaTaeCJ
*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)ubaTaeCJ
'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'ubaTaeCJ
1'"ubaTaeCJ
@@smjobRelated Programs
- length of the string in python
- find a character in a String Python
- occurences of character in string python
- lowercase to uppercase in python
- uppercase to lowercase in python
- python count vowels in string
- Compare two Strings in python
- find vowels in string python
- find substring in string pyhton
- occurences of substring in a String python
- Reverse the String in python
- string Palindronme in python
- Remove the Vowels in String Python
coming Soon
coming Soon