In this program, we will add the word in a string.
Steps to solve the program
- Take a word as input from the user.
- Create an empty string.
- Add each character from the input word to the empty string using for loop with the range function.
- Print the output.
word = input("Enter the word: ")
str1 = ""
for i in range(len(word)):
str1 += word[i]
print(str1)
Output :
python