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"

7th Jan 2023, 5:09 PM
Misterio
Misterio - avatar
3 Respuestas
+ 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...?
7th Jan 2023, 6:33 PM
Jayakrishna 🇮🇳
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
7th Jan 2023, 8:00 PM
Ali M
Ali M - avatar
0
This code is from solution from SoloLearn
8th Jan 2023, 3:18 PM
Misterio
Misterio - avatar