Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cards = input().split()
- faro_shuffling = int(input())
- for i in range(faro_shuffling):
- left = []
- right = []
- for j in range(1, len(cards) // 2):
- left.append(cards[j])
- right.append(cards[j + len(cards) // 2 - 1])
- for k in range(1, len(cards) - 1, 2):
- cards[k] = right[ k // 2]
- cards[k + 1] = left[k // 2]
- print(cards)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement