0
Am I do anything wrong?
s = input() def hashtagGen(text): s1=s1.replace("","") return "#"+s1 print(hashtagGen(s)) In print(hashtagGen(s)) is problem "In this string you use tab an indent"
3 Answers
+ 2
Tab space for same block of code should be same. But your 2nd, 3rd line have different indentation in function.
s1 is undefined.
What you are replacing with what? Both seems to be empty space I.e replacing empty space with empty space...?
0
you have 2 mistakes there
1- the spaces make sure they are the same (hard to explain here)
2- you should use "def hashtagGen(s1)" since you use s1 as variabe
i re-wrote the code even tho I don't understand what are you trying to replace there, but i left it there if you want to add to it
and here is the code....
https://code.sololearn.com/cU040k9To3SB/?ref=app
0
This code is from solution from SoloLearn