Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

adding if statements and for loop in pyhton with tuple

name_of_students = ("Jim" , "yeasin" , "Arafat")
print(name_of_students.index('Arafat'))
#adding for loop with tuple
for x in name_of_students:
    print(x)
#adding if statement with tuple
if "yeasin" in name_of_students:
    print("Hello Yeasin")
 
PREVIOUS NEXT
Tagged: #adding #statements #loop #pyhton #tuple
ADD COMMENT
Topic
Name
9+6 =