Advertisement
Guest User

Untitled

a guest
Aug 29th, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. ~$ python3
  2. Python 3.10.5 (main, Jun 8 2022, 09:26:22) [GCC 11.3.0] on linux
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> CACHE_SZ = 64
  5. >>> [[0]*16]*(CACHE_SZ/16)
  6. Traceback (most recent call last):
  7. File "<stdin>", line 1, in <module>
  8. TypeError: can't multiply sequence by non-int of type 'float'
  9. >>> [[0]*16]*(CACHE_SZ//16)
  10. [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
  11. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement