Question for python 35.2
Hello everyone, ive been stuck on this question for quite a while can u guys help me out thanks! We are creating our own social network application and need to have a hashtag generator program. Complete the program to output the input text starting with the hashtag (#). Also, if the user entered several words, the program should delete the spaces between them. Sample Input code sleep eat repeat Sample Output #codesleepeatrepeat Hint You can use the replace() function to replace the spaces (" ") with empty strings (""). See how it works: s = input() def hashtagGen(text): #your code goes here text1= text.replace(text,"#"+"".join(text)) return text1 print(hashtagGen(s)) This is the code i use however, whenever the test case has words with a space, like space cat, the output will be #space cat instesd of the desired #spacecat