I wanted to cover up a word. I get the user input.
user_input = input("Enter input: ")
After getting this value I want to represent it in asterisks.
Like if the user_input
is "password"
I want ********
. Basically, the same number of characters as the original input.
My code for this is:
shadowed = ''
for i in range(len(user_input)):
shadowed += '*'
So I get shadowed
as my desired keyword.
However, my editor highlights the i
and says: Unused variable 'i'pylint(unused-variable)
Would this be an issue? Or do I have to fix it?