HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The sample()
method returns a list with a
randomly selection of a specified number of items from a sequnce.
Note: This method does not change the original sequence.
Parameter | Description |
---|---|
sequence | Required. A sequence. Can be any sequence: list, set, range etc. |
k | Required. The size of the returned list |