Jun-30-2020, 08:58 AM
Hello,
Can you please explain to me in simple lines, the difference between "a = list("apple)" and "a = ["apple"]"?
Actually I was trying to append the character '_' to every character I find in the list.
while
which is the desired answer but I just wanted to know the difference. Thank You
Can you please explain to me in simple lines, the difference between "a = list("apple)" and "a = ["apple"]"?
Actually I was trying to append the character '_' to every character I find in the list.
WordToBeGuessed = ["Apple"] Hidden = [] for EachCharacter in WordToBeGuessed: Hidden.append("_") print(WordToBeGuessed) print(Hidden)gives me ['_']
while
WordToBeGuessed = list("Apple") Hidden = [] for EachCharacter in WordToBeGuessed: Hidden.append("_") print(WordToBeGuessed) print(Hidden)gives me ['_', '_', '_', '_', '_']
which is the desired answer but I just wanted to know the difference. Thank You