I am attempting to create a for loop to append both the contents of the first list num to num2 + the word thousand. I am looking for
nums2 = ['one thousand', 'two thousand', 'three thousand', 'four thousand']
. When I attempt to run this, all I am given is list indices must be integers or slices, not str
. Any suggestions?
nums = ['one', 'two', 'three', 'four']
nums2 = []
for i in nums:
nums2.append(nums[i] + ' thousand')
Edit (1:13PM EST, 12/10/2020):
This question has already been asked! My bad.
Appending the same string to a list of strings in Python