Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

for loop in python


data = [34,56,78,23]
sum = 0
# for loop is to iterate and do same operation again an again
# "in" is identity operator which is used to check weather data is present or not
for i in data:
  sum +=i
  
print(sum)
  

Source by www.twitch.tv #
 
PREVIOUS NEXT
Tagged: #loop #python
ADD COMMENT
Topic
Name
2+6 =