Python Tutorial 10 Printing a list using a for loop

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

For printing the list elements there could be very simple code as below

subject_list = ['math', 'physics', 'chemistry', 'biology', 'sociology', 'english']
for course in subject_list:
print(course)

#prints
math
physics
chemistry
biology
sociology
english

mkhatri
Автор

Thank you so much. I found this video very useful!!!

malksharshar
Автор

Thank u so so much!!! You saved my project!!!

Agkh
Автор

Thank you so much! I was struggling with this.

AstonJay
Автор

THANK YOU SO MUCH!!!!HAVE A NICE DAY!!!

mariaGreenDayever
Автор

@mrLauLearning, How would one create a flow chart explaining this loop ?

rangerup
Автор

daamn mate what type of super laptop do you have? you have so many windows open and it's smooth as butter, if you don't mind could you tell me the specs, cos my laptop is really slow

misan
Автор

what if i want to print it on the same line?

salientbaco
Автор

why wont this work?
a=[1, 234, 45, 76, 98, 3, 2, 2, 1, 145, 446, 56, 76543, 76, 576, 76, 86, 58, 685, 8765]
B=input("Please enter a number")
if B == a[0]:
print(a[0], a[8], a[5])
else:
print(" not vaild for this list")

terminate
join shbcf.ru