Using python 3 design a function perfectshuffleinplacealist


Using python 3 design a function perfect_shuffle_in_place(a_list) which takes as argument a list and performs the perfect shuffle on the list. The function should modify the list, and not return any value. After the function call, the argument list should have the same length and contain the same elements; only the order of them should change.

Example:

In [1]: my_list = [1, 2, 3, 4, 5, 6]

In [2]: perfect_shuffle_in_place(my_list)

In [3]: print(my_list)
[1, 4, 2, 5, 3, 6]

Solution Preview :

Prepared by a verified Expert
Business Management: Using python 3 design a function perfectshuffleinplacealist
Reference No:- TGS02759920

Now Priced at $20 (50% Discount)

Recommended (98%)

Rated (4.3/5)