Concatenating and repetition of tuples

We can concatenate tuples using the plus operator:

>>> t + (338186.0, 265E9)
('Norway', 4.953, 3, 338186.0, 265000000000.0)

Similarly, we can repeat them using the multiplication operator:

>>> t * 3
('Norway', 4.953, 3, 'Norway', 4.953, 3, 'Norway', 4.953, 3)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset