Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Sampling data in different ways

#enumerate() function takes a collection/data (e.g. a tuple) and returns it as an enumerate object.
#This function adds a counter as the key of the enumerate object.
#In simple language enumerate will attach numbering starting from 0 to n- for the data provided.

x = ['Kushal', 'Aadarsh', 'Jay']  #[]
y = enumerate(x)  #,4

print(list(y)) #y      tuple   list
Source by kadamjay.rf.gd #
 
PREVIOUS NEXT
Tagged: #Sampling #data #ways
ADD COMMENT
Topic
Name
4+8 =