Winter Bootcamp in ML and IoT in Jaipur
 Course content (For Bootcamp & Winter Training):- Machine Learning (ML) || Internet of Things (IoT) || Register for winter bootcamp
0 like 0 dislike
in Tutorial & Interview questions by (3.3k points)

1 Answer

0 like 0 dislike
by (3.3k points)
selected by
 
Best answer

For loop

# Initialize three list. List can have numbers and strings 

numbers = [10, 20, 30, 40]
vehicles = ['cars', 'bikes', 'buses', 'trucks']
age = [40, 'fifty', 60, 'seventy']
 

# Execute for loop using the numbers in numbers list

for count in numbers:
print ('This is number: %d' % count)
# %d indicates the list contains numbers 

# Execute for loop using the vehicle names in vehicles list

for automobiles in vehicles:
print ('A type of automobile: %s' % automobiles)
# %s indicates the list contains strings 

# Execute for loop using numbers and strings in age list

for i in age:
print ('My age is: % r' % i)
# %r when we don't know what exactly is in the list  

# Initialize an empty element list, data will be appended to this list later
element = []

# Execute for loop using the numbers in the range 0 to 8


for j in range(0, 8):
print ('Adding to the list: %d' % j)
element.append(j)
# Appending data to the element list 

# Execute the for loop using the data appended in the element list


for k in element:
print ('Retrieving back from the list: %d' % k)
 

Winter 10 Days boot-camp classes(7 HRS Daily) will start from 5, 20 & 27 December 2019 in:
1) Internet of things(IoT) Using RASPBERRY-PI
2) Machine Learning (ML)

70% OFF| Fee-INR 3,000/-

Limited seats!! Hurry up!!

[[ CALL - 07976731765 ]]

Some Study Resources are compiled from original Stack Overflow Documentation, the content is developed by the different experts at Stack Overflow. Study resources are released under Creative Commons BY-SA. Images may be copyright of their respective owners. This website is for self-learning and not affiliated with Stack Overflow. All trademarks and registered trademarks are the property of their respective company owners. Please send feedback and corrections to chandwaglobal@gmail.com.

...