About Python, len () and randint ()

A note about len () and randint (). (1)len() If you take a list type as an argument, you can get that element.

list = [0,1,2,3,4,5]
print(len(list))

#6 is output

(2)randint() Generate a random number.

import random
r = random.randint(1,100)
print(r)

#Generate a random number from 1 to 100

Recommended Posts

About Python, len () and randint ()
About python objects and classes
About Python variables and objects
About Python datetime and timezone
About Python and regular expressions
About Python and os operations
Python # About reference and copy
About Python sort () and reverse ()
About _ and __
About installing Pwntools and Python2 series
About python dict and sorted functions
About dtypes in Python and Cython
About Python pickle (cPickle) and marshal
[Python] About Executor and Future classes
[Python] Difference between randrange () and randint ()
About python slices
About python yield
About python, class
About python, range ()
About python decorators
A story about Python pop and append
About python reference
About Python decorators
[Python] About multi-process
Talking about old and new Python classes
Talking about Python class attributes and metaclasses
Think about depth-priority and width-priority searches in Python
About the difference between "==" and "is" in python
A story about modifying Python and adding functions
[Python] Learn about asynchronous programming and event loops
About the * (asterisk) argument of python (and itertools.starmap)
About shallow and deep copies of Python / Ruby
[python] Compress and decompress
About Python for loops
About Class and Instance
Summary about Python scraping
About function arguments (python)
Python and numpy tips
[Python] pip and wheel
Batch design and python
Python iterators and generators
[Python] Memo about functions
Ruby, Python and map
Summary about Python3 + OpenCV3
About cumprod and cummax
About Python, for ~ (range)
About Python3 character code
python input and output
[Python] Memo about errors
Python and Ruby split
About Python development environment
Python: About function arguments
Python, about exception handling
About Python Pyramid traversal
About Python3 ... (Ellipsis object)
[Python] Chapter 01-01 About Python (First Python)
About cross-validation and F-number
[Python] About standard input
About __all__ in python
Python3, venv and Ansible
Python asyncio and ContextVar