Sorry for confusing title. This program should take the letter in a string and add the word ‘List’ so that it can find the 2 list groups I created. Python is taking every character in the word ‘hList’ instead of every value in the variable hList. Is there any other way to do this?
The output I’m expecting is: 2 5 3 6 6 2
userInput = 'hi' hList = [2, 5, 3] iList = [6, 6, 2] userInputLen = len(userInput) for i in range (0, userInputLen): for objects in (userInput[i] + 'List'): print(objects)
You must be logged in to reply to this topic.