Answers for "loop and built in function python"

1

python for loop

for item in ['mosh','john','sarah']:
    print(item)
Posted by: Guest on November-04-2020
0

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)
Posted by: Guest on December-09-2020

Code answers related to "loop and built in function python"

Python Answers by Framework

Browse Popular Code Answers by Language