Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fList = {7:7, 9:9}
- def checkList():
- if not None in fList:
- print(fList)
- fL = random.choice(fList)
- ttt[fL] = computerLetter
- del fList[fL]
- print(fL)
- print(ttt)
- print(fList)
- {9: 9, 7: 7}
- Traceback (most recent call last):
- File "/home/jason/Desktop/Programming/Python3_5/TestCode.py", line 35, in <module>
- checkList()
- File "/home/jason/Desktop/Programming/Python3_5/TestCode.py", line 22, in checkList
- fL = random.choice(fList)
- File "/usr/lib/python3.5/random.py", line 265, in choice
- return seq[i]
- KeyError: 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement