Your expatiation is okay @newbieAuggie2019,but there is better way to get the string output.
Convert
String formatting as linked be @Yoriz,is a nicer way to do it.
Convert
str(x)
and +
,is maybe okay in this small scale,but can become ugly very soon if string is longer.String formatting as linked be @Yoriz,is a nicer way to do it.
my_string = ("go") my_list = [1, 2, 3, 4] for item in my_list: print(f'{myString} {item}')
Output:go 1
go 2
go 3
go 4
Also a lot of powers in this way if need an other look for the output.my_string = ("go") my_list = [1, 2, 3, 4] for item in my_list: print(f'|{myString} -->{item:3}|')
Output:|go --> 1|
|go --> 2|
|go --> 3|
|go --> 4|