Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. cards = input().split()
  2. shuffle = int(input())
  3.  
  4. lenght = len(cards)
  5. mid = int(lenght / 2)
  6.  
  7. for i in range(0, shuffle):
  8.     list = []
  9.     for p in range(0, mid):
  10.         list.append(cards[p])
  11.         list.append(cards[mid])
  12.         mid += 1
  13.     cards = list
  14.     mid = int(lenght / 2)
  15.  
  16. print(list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement