0

What's wrong in this code.. I need to print only string not #string but it prints including #

String = " hello my name is selva and I'm working in #Google and my friend's are working in #Amazon and #Flipkart " ans = String. split() for i in ans: if "#" in i: print (i)

2nd Aug 2021, 2:55 PM
SelvaKumar
2 Respuestas
+ 9
print (i[1:])
2nd Aug 2021, 2:59 PM
Simba
Simba - avatar
+ 1
SelvaKumar How about this one? :- print(input().replace("#", "")) # Hope this helps
3rd Aug 2021, 7:26 AM
Calvin Thomas
Calvin Thomas - avatar