I have tried most methods but for some reason it just does not want to print without the brackets. Why is that??
CodePudding user response:
It means that list1
and/or list2
are lists of lists. Try:
for x in list1:
print(x[0])
for y in list2:
print(y[0])
CodePudding user response:
It is probably caused by an extra axis. Try this:
for x in list1[0]:
print(x)
CodePudding user response:
If you want to just print the list without square brackets use the command: print(*x,sep=" ")