Using python 3 design a function perfectshuffleinplacealist


Please help with the following programming :

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
Basic Computer Science: Using python 3 design a function perfectshuffleinplacealist
Reference No:- TGS02760632

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)