Print function


Hi Experts,

can you help my to understand why :
print ["O"] * 5

['O', 'O', 'O', 'O', 'O']

instead of:


Because the result needs to be one value, what you expect is five values, won't work.

If you double a list, then does it not make more sense to add all the elements again, rather than to clone it? In particular if you consider the elements to be the list


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.