Skip to content

Instantly share code, notes, and snippets.

@tjguk
Created April 25, 2020 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjguk/840ba3948217844e710e5ff4aee994d3 to your computer and use it in GitHub Desktop.
Save tjguk/840ba3948217844e710e5ff4aee994d3 to your computer and use it in GitHub Desktop.
# Write your code here :-)
# l = ['Tim', 'David', 'Peter', 'Tommy']
# for i in l:
# print(int(i))
# iterator = iter(l)
# while True:
# try:
# print(next(iterator))
# except StopIteration:
# break
# while True:
# age = input("what is your age? ")
# try:
# print(int(age))
# except ValueError:
# print("Whoops; please write your age in numbers")
# else:
# break
import random
def randomised(l):
l2 = list(l)
random.shuffle(l2)
return l2
c = Cards()
print(repr(c))
for i in c:
print(i)
# Write your code here :-)
# l = ['Tim', 'David', 'Peter', 'Tommy']
# for i in l:
# print(int(i))
# iterator = iter(l)
# while True:
# try:
# print(next(iterator))
# except StopIteration:
# break
# while True:
# age = input("what is your age? ")
# try:
# print(int(age))
# except ValueError:
# print("Whoops; please write your age in numbers")
# else:
# break
import random
def randomised(l):
l2 = list(l)
random.shuffle(l2)
return l2
c = Cards()
print(repr(c))
for i in c:
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment